Mark MacLennan also indecently assaulted a teenage girl who was involved in amateur dramatics while he was supposed to be chaperoning children.
A judge told MacLennan at the High Court in Edinburgh: “The crimes are of a particularly vile nature.”
John Morris QC said in his opinion only a substantial prison sentence was appropriate to deal with his offending.
“Both of these young people were entitled to feel safe,” said the judge.
He said the young woman had been profoundly affected and the parents of the little boy had expressed concerns about his subsequent behaviour.
The judge also ordered that MacLennan, 30, should be kept under supervision for a further two years and warned he could be returned to prison if he re-offended during that period.
He was also placed on the sex offenders’ register indefinitely.
MacLennan was earlier convicted of assaulting the little boy at a Highland nursery during an oral rape committed between August 1 in 2012 and May 23 in 2013.
He was also found guilty of indecency toward the girl between October 1 in 2007 and July 31 in 2010 at Stirling and Dunfermline when she was aged between 13 and 15. He was also of possessing child pornography at an address in Stirling.
The mother of the boy who was sexually assaulted at the nursery told his earlier trial that her son had been upset in May 2013.
She said he had made “an alarming statement” while at home watching television and said it had been about MacLennan.
The woman said it was a remark of “a sexual nature”. She added: “I was making dinner and he just came out with it while he was watching television.”
Social services were contacted and the police were called in. A taped interview with the boy was shown to jurors at MacLennan’s trial.
A police officer asked him about the incident and he said: “Don’t like Mark.” He was asked what he had told his mummy and daddy and replied that MacLennan had carried out a sexual act.
The female victim said she had met MacLennan when she was involved in amateur dramatics. Volunteer MacLennan molested the girl and made sexual remarks to her.
Defence counsel Dale Hughes told the judge that MacLennan appeared for sentencing “sporting quite an impressive shiner.”
He said MacLennan told him that he had been assaulted while on remand.
He said the honours graduate had previously obtained a General Teaching Council certificate and added: “This is a man who wanted to be a teacher from an early age.”
The judge said: “Presumably that will be at an end now.”
Mr Hughes said: “There is no getting away from the gravity of the offences.”
The defence counsel said that MacLennan put down the indecent images of children he possessed to “curiosity”. He had downloaded a single file which seemed to “grow and grow”.
Mr Hughes said that otherwise first offender MacLennan was “an inoffensive, likeable young man.”
The judge said that he took into account in sentencing MacLennan his age and lack of previous convictions.
SCOTSMAN TABLET AND MOBILE APPS