As the main problem of the original circuit, the MOSFET will never turn off, because there's no means to pull down the gate voltage to zero. Actually, the motivation for the circuit design is completey unclear to me.
What I would do: Use a zener diode to generate a voltag level within the MOSFET and photo transistor ratings, e.g. 10 to 15 V with a suitable series resistor and a sufficient low pull-down resistor between gate and source, at least 100 k, or less, depending on the intended switching speed. With 1 MOhm pull-down, you get switching speeds in the ms range.