It seems to me that the main problem isn't so much in the legalization of an addictive substance, but rather the type of organization that sells it to consumers. We don't want criminal groups to continue running the recreational drug industry for all of the obvious reasons. But then legalizing the drugs would only create a free market corporate system whose main purpose would be to maximize profits by getting large numbers of people hooked on their product. They'd use sophisticated marketing campaigns to essentially make drug addiction into a socially acceptable occurrence.
Perhaps there could be an effective middle ground by turning to the non-profit sector. The drugs in question would be legalized but the distribution would only be allowed through a strictly monitored/regulated division of nonprofit organizations that would simultaneously run rehab clinics and counseling programs. They would be required to channel most of their profits back into public health, education and community service programs.
In fact, I think all of the industries upon which criminal organizations have thrived (drugs, prostitution, illegal gambling, etc.) should be legalized and put into the hands of closely regulated NPOs. This would deprive the gangs of their revenue while limiting the potential legalization side-effects of corporate greed.