Why does this Mosfet get Hot?
The FETs need a few volts on the gate to turn them on. 

In your 'B' circuit, that means when the FETs are on, there still has to be several volts from drain to source (Vds) to bias the gate. The power dissipated in the FET is the current multiplied by Vds, which heats the FET. The voltage drop across the FET is why the load draws less current than circuit 'A'.

In your 'A' circuit, the 4013 drives the gate, so Vds can drop to sub-volt, even millivolt, levels, for very little heating.

If you have a DMM, measure the voltage across the FET in each case when it's conducting.

You could modify your 'B' circuit like this







simulate this circuit &ndash; Schematic created using CircuitLab

Not all of these components may be needed, depending on the value of your load supply, and whether you can get a Vgg supply easily.

The important point is that the gate can be swung to +10 to +15v volts (I've drawn a GND symbol, not because the circuit needs to be grounded, but because that's the 0v reference point I'm taking all my voltages from) whatever the FET drain voltage is. 

If your load supply is in the range 10-15v, then you do not need a separate Vgg supply, just connect them together, and lose D1 and R2. If your load supply V1 is a much higher voltage, then D1 and R2 serve to limit the gate volts, most FETs go bang with more than 20v, and are fully on at 15v. Or you could move D1 R2 to create a 15v Vgg from V1, or you could use a regulator to create Vgg from V1, the possibilities are endless. Note the Vgg supply does have to be connected to the FET source terminal, it can't just be floating.

If you're switching frequently, you'd probably want to reduce R1, as a high value makes for a slow turnoff. For fast switching, it would be better to have a proper buffer between the opto and the FET gate to give you a low impedance drive in both directions.

Troubleshooting - with this circuit, you ought to be able to see only mV (10 maybe, 100 if it's a very heavy load) Vds when it's on, and most of your Vgg voltage as Vgs.