It's not clear whether or not there was any result-changing vote fraud. There were unquestionably irregularities that Mousavi pointed out when he declared victory before the first results were even in, but who knows how widespread it was.
If the reported vote totals are to be believed, Ahmadinejad won territory deep in what was thought to be Mousavi's stronghold, according to the BBC. This seems unlikely, but stranger things have happened in Iran. The government also blocked text messaging for a month leading up to the election, which had been a primary tool of the reformists in organizing voter drives.
Bottom Line: Who knows. There was almost certainly some level of fraud, but the result could have been at least partially due to the government severing one of the reformists' main lines of intercommunication. Also it's important to remember that the conservative-dominated Guardian Council must approve every candidate who runs in the presidential election, and it is unlikely that they would have approved one that could have easily defeated Khameini's chosen candidate of Ahmadinejad.