Issues with coupling a buffer to an optocoupler
The photo Darlington has a high CTR of 500% which after IR coupling losses is like a transistor with Beta of 5 in the saturated Vce(sat) condition with normal LED drive current range.  

Yet I expect the transistors must have  at least an hFE if 100*100 in linear range and 10*10 at Vce(sat) . The equivalent base capacitance is multiplied by hFE to the Emitter Follower output capacitance in the linear zone with a gain > 10k and your result of T=RC  or 7ms/100k=0.07uF.

Thus you need to speed up the time constant of Re*Ceq=T by lowering Re without compromising the On state voltage more than 12V-2V expected for a Darlington.

If you defined your input/output impedance and voltage 1st and decay time in a system design spec !! Before selecting a topology or parts you will have more success.   There are much faster non-darlingtons which will give a greater swing and faster response.


as well you can drive the IR LED cathode direct from logic with a 10mA current limiting resistor then use then control the turn slew rate so the target turns off faster with an appropriate configuration by pullup or pull down.  



  Thus Q1 &amp; Q2 are redundant .


All these must go into your design spec 1st!!!

Changing R7 from 100k to 1k will see a sharp improvement at the expense of a 1V drop in ON Vce(sat) so &lt;=10k is a suitable compromise.


  Always define acceptance criteria 1st before choosing parts and any design. Then compute from datasheets if a part affects your criteria.