I'm not aware of any established canon stating that Shmi was a virgin at the time of Anakin's birth. However, in Episode 1, she claims that Anakin has no father, which leads us to the presumption of an "Immaculate Conception" of some form.
QUI-GON : You should be proud of your son. He gives without any thought of reward.
SHMI : He knows nothing of greed. He has...
QUI-GON : He has special powers.
SHMI : Yes...
QUI-GON : He can see things before they happen. That's why he appears to have such quick reflexes. It is a Jedi trait.
SHMI : He deserves better than a slave's life.
QUI-GON : The Force is unusually strong with him, that much is clear. Who was his father?
SHMI : There was no father, that I know of...I carried him, I gave him birth...I can't explain what happened. Can you help him?
Shmi's statements do not at all address whether or not she had had sexual intercourse prior to Anakin's conception or birth, so we cannot (absent other evidence) say for certain that she was a virgin at that time. However, it seems that she strongly believes that any intimate relations she may have had prior to the discovery of her pregnancy were well before any time at which they could possibly have resulted in that pregnancy.
Quoted text is from BlueHarvest.net's copy of The Phantom Menace Script.
Script was discovered via Wookieepedia.net's article on Shmi Skywalker Lars.
Wookieepedia page found via Google.
EDIT: It seems there is a novel which precisely addresses your concern. If you accept the book Darth Plagueis as canon, then you may consider this:
Nearly a decade before his death, the Sith Lord, Darth Plagueis, and his apprentice, Darth Sidious, committed an act that directly violated the nature of the Force. To advance their plan for galactic domination, the two Sith attempted to will a being of their own design into existence, pouring their abhorrent intent into waves through the Force to the countless midi-chlorians that were spread throughout the galaxy. The experiment failed, however, and the midi-chlorians, not willing to obey, not only frustrated Plagueis' attempts, but countered in reprisal, conceiving a child within the slave Shmi Skywalker.
Quote regarding Darth Plagueis is from Wookieepedia's page on Anakin Skywalker.