The spread of a contagious sexually transmitted virus led to a five-year quarantined period of sexual suppression among the human race. Once that period came to an end, people were allowed to have sex again but according to a set of strict guidelines to keep the virus or something like the virus from emerging in their sexual activities...
I likewise echo the above sentiment. My suspension of disbelief is not capable of overcoming this for the following reasons:
1. To expect every nation on the Earth to react the same way is not logical. Of course, this problem can be overcome by setting your story far enough in the future that a one-world government is a reality.
2. It's simply not enforceable. How would you propose such a 5-year ban on sex be enforced? Monitoring devices? Every one on the planet constantly watched by the sex police?
What about under-developed and Third-World nations? AIDS is rampant in Africa right now in part due to the lack of ability to control it. The governments there do not have the resources, manpower or will to get the situation under control. What about countries like Afghanistan or Iraq? War torn, bombed to stone age regions of this Earth with little to no infrastructure.
3. People wouldn't stand for it. Period. AIDS has been the scariest STD of the modern age and that didn't even slow things down. A virulent easily transmitted STD won't keep people from having sex.
4. Is it an STD or not? STDs are, by their very nature, only transmitted through sexual contact or the exchange of bodily fluids. STDs are not airborne or transmitted through sneezing or casual contact.
5. A five-year decline in the human population? No sex = no birth = population decline. What government would stand for that? What economy would survive such a decline?
crack down on people who display such behavior and offered them two options: either take medication that would lower their sexual impulses to a civil, tolerate level or undergo radical brain surgery that would rid them of their sexual impulses completely...
Your subsequent clarification of what a sexual deviant is only muddies the water further. If homosexuality is considered a deviant behavior, and the medication lowers a homosexual's impulses to a civil, tolerable level, aren't they still homosexual?
Deviant behavior is just too broad a spectrum to be controlled by medication. Fetishes? Those can be considered deviant sexual acts as well.
You have an interesting notion here, it just needs work. The easiest solution would be to target just one class of sexual "deviant." A tougher, yet surmountable task would be possibly to rework the threat (something instead of an STD, perhaps).