The very least that could be done is legalize it for medical reasons. Remember the Hippocratic oath? First do no harm. Doctors would make sure that whenever marijuana is prescribed, it would be done so for legitimate reasons. Abuse, which is technically impossible, of the drug would be next to nonexistent.
But there's also the option of allowing public consumption altogether, in a similar manner to how cigarettes are handled today. The facts show that marijuana use does not significantly affect motor skills associated with the average workplace or those with driving. Ultimately it would be safer than both cigarettes and alcohol.
Marijuana use and possession are often referred to as "victimless crimes"
So legalize it today!