You are looking for the records of the church courts known as the Kirk Sessions.
They are described by the National Archives of Scotland as follows:
Of most interest for genealogists and local historians are the minutes of the kirk sessions, which typically contain a detailed and often colourful record of the discipline the minister and kirk elders handed out to errant parishioners for offences such as drunkenness, swearing, breaking the Sabbath, quarrelling and sexual misdemeanours.
I think it is fair to say that presbyterian elders were vigorous in seeking the identity of fornicators, with special attention to those who fathered illegitimate children.
Although it is planned to make these records available on-line (by subscription) in 2013,
at present you need to visit one of the archives listed at http://www.nas.gov.uk/