It would definitely seem like legalizing it and making things like STD testing mandatory would make everyone safer. I imagine a lot of disease is spread via the sex trade. There are a lot of lonely people out there and trying to eradicate the oldest profession is a fools errand. Might as well try and make it as safe as possible for all involved.
I'm all for legalization of prostitution for a lot of reasons, but one of the main reasons is so that people can take care of themselves and be protected by laws and law enforcement. By treating it as taboo, so much abuse is knowingly overlooked and so many people are marginalized, creating a system of shame and myriad opportunities for related injustices and wrongdoing. The problem is not only the spread of STDs in general, but the strengthening of strains of STDs like syphilis. There are now strains of syphilis that respond only to a few powerful drugs (some reported to respond only to one drug) which are quickly losing potency. Syphilis is not a disease that we are familiar with in the same way that people in the past were, but it is a terrible, terrible disease. I would hope that if prostitution becomes legal on a national level that people would take the issue of safe sex more seriously and get on board with funding or demanding more effective ways of preventing, controlling and managing STDs because condoms do an ok job, but not for things like genital warts and other nasty stuff. Another thing I would hope to see is the recognition at last that sex is rarely about reproduction for many people and that this has been the attitude for a long time. In fact, I think that we need healthier attitudes about sex and social dynamics in a very big way.