How to deal with "peaks" voltages in mosfet in boost converter?
Ok assuming your drawing is of the mosfet drain voltage, are you sure that waveform is correct? You claim the waveform is the same as this one from the question you linked, but that's not the same as your drawing. 



A spike right after the mosfet shuts off is expected. That's the "boost" voltage. The signal you've drawn... I don't know what that would be. Is it maybe the gate voltage and not the drain? idk.

I'm going to guess that your waveform does look like the one in this picture.

I think what's happening is your mosfet is not being driven with enough gate voltage, either that or the switching time is too slow. A dead giveaway is that the mosfet is getting hot. You should probe the gate and update the question with your results. I think you're going to want a different mosfet with a lower Vgs(on).

You should also post the complete circuit including the optoisolator, because there could be a problem there. For example, you might be able to lower the 24 ohm gate resistor, but I can't say because I don't know the part number of the optoisolator.