Selling something that is free is not a lucrative business for the Mafia. I think you have to make up your mind about the exaggerated scenarios you're imagining.
Here's two straightforward policies that would ameliorate these concerns:
1) Dole out the drugs on site. This is done already all over the world all the time. No take home doses.
2) This is a last resort of Norwegian citizens who have tried other methods of recovery. If you read the article, you'd see it will affect about 400 people. This is a good start, hardly a global heroin empire.