CAN be fitted, since the m50 engine is derived from the m20 anyway.
BUT, you would have to change your piston as well as your original m20 pistons are meant only for 2 valves application and using the same piston with a m50 head which has 4 valves per cylinder will have all your valves bent beyond salvage even with just one crank on your starter.
so in other words, unless you are doing a complete overhaul or you have too much money to spare, this is not practical in a economical sense.
anyway, you will also have to tackle the issues of the m50 fuel injection system after fitting the head or else the engine cant run. alternatively you may try carburating it with a webber system