Can doctors legally give someone a prescription for proscar when they just need propecia?

Yes, doctors can prescribe whatever is in the best interest of their patients. With regard to Proscar versus Propecia, they are both exactly the same medication, but Proscar is a 5mg dose of finasteride while Propecia is a 1mg dose. The two are exactly equivalent if you can cut the Proscar 5 mg pill into fifths. That is a problem for some patients, because the cutting process is not easy.