This referendum seems very odd to me. Those who votes "Yes" were 99.3 %.
At the time, was this a consensus among the population, to have a religious republic? As you can see, the link I provided have little information about it, so would be nice to have more information about it.
I can't really comment on the accuracy of the result. But the fact that the overwhelming majority of people would have voted yes isn't too surprising.
It was more of a vote for the revolution and against the Shah. Khomeini, in exile in paris, had been talking about democracy and clerics staying out of politics and equality, saying all the right things etc.. etc... Most of the young people in the streets didn't know who Khomeini was until the street protests started, they hadn't read his work of the 60's.
Admittedly, he started changing his tune as soon as he stepped back in Iran.
Also, keep in mind 50% of the population was illiterate at this point. They weren't making an informed decision about the pro's and con's of this particular constitution and its articles vs another.
More importantly, nothing was a done game after this referendum. This happened pretty early on and for a few years after this there was a lot of public debate, fighting between groups and organisations, politicians, ideologies.
The interim government and the first elected government included people such as: http://en.wikipedia.org/wiki/Abolhassan_Banisadr (won 78.9% of vote and became the first president of the Islamic Republic)
http://en.wikipedia.org/wiki/Mehdi_Bazargan (very influential politician/intellectual)
http://en.wikipedia.org/wiki/Ebrahim_Yazdi (foreign minster)
These people were western educated, fairly liberal in their views. Although they talked about religious democracy, what they had in mind was nothing close to what Khomeini ended up implementing. These people were closely associated to the National Front, the party of Mohammed Mossadegh (who you may of heard of).
These people were surged out after the hostage crisis. They came out against it, but after they were unable to do anything about it they all resigned in protest. Many were exiled.
Note, it was after the surging of these people that the Islamic Republic introduced strict vetting of the election process.
Additionally, the mojahedin and other leftist groups clearly had a large swath of support. The mojahedin being the most extreme engaged in violent street guerilla battles with the islamist groups.
All of this ended shortly after Saddam Hussein attacked. The domestic debate/discussion and fighting ended. Everyone united behind the nation to defend the country. [The mojahedin were unique with siding with Saddam and this is when they lost support and people saw them as traitors.] By the end of the war, the khomeinists/islamists had established their power, every other domestic opposition had been neutralised.
Wasn't long after that, that the Islamists themselves started to split, no longer having a political enemy to stand against. the "leftist" faction of the islamists rebranded themselves as "reformists", calling for "change within the system" and came in to the presidency and parliament with a wave of popular support. After a setback in 2005-2008, both from being banned from running for parliament and also by their own action of deciding to boycott the 2005 presidential election to protest the structural limitations of the regime preventing them from making the progress they desired, we saw a resurgence in 2009 under Mousavi. The same Mousavi who was prime minster in the 80s, during the war, nicknamed "Khomeini's Prime Minister", was now the "leader" of the "green" reformist opposition.
EDIT:
Iranian-American historian (http://en.wikipedia.org/wiki/Abbas_Milani) has written a recent biography of the Shah and he makes an interesting point that is relevant to your question. He shows how even though the Shah's father (Reza Shah) took a strong stand against the clerical influence on politics and going to extremes such as completely banning the chador, the Shah himself acted a bit differently. He did not see the clerics as the big domestic threat, he saw Mossadegh and his nationalist/democratic party and the Tudeh communist party as the number one domestic threat. He brutally silenced and repressed these groups and - here's the kicker - actually made deals and worked with the clerical authorities. Iran during his reign had one of the fastest growth of Mosques being built across the country (around 3000). This allowed the clerics to have a very strong nation wide network and the mosque was one of the few avenues of dissent.
As a bonus, here's a nicely edited video with music of various clips of scenes from the revolution. Gives you a sense of the fever and situation on the ground at the time.
It's pulled from the intro of a documentary called "From Tehran to Cairo", and its the "shah's side of the story" of the revolution, as told by his wife, queen Farah.