I'd say they're too completely different things. A legal abortion is not harmful to the woman, and does not affect anyone else. However, cocaine and heroin kill, and often affect those around the addict also. While I don't care if one person wants to take the drug, when that starts negatively affecting families, then it becomes a problem. The difference between abortion and legalisation of drugs are vast.
Your main reason was that "people will do it anyway, and it's safer if it's legal." Legalizing coke and heroin would make it safer for the users, and also take money out of drug cartels. Cocaine and heroin kill, but abortion doesn't?