Work out the value of the resistor that is the load for the transistor, from that you can work out how much current the transistor needs to take to make the bottom end of the resistor equal to 0V. Now for your opto isolator there is a transfer ratio which is the current in the opto diode compared to the collector current, this is typically 10 (can be <1 to >100). this is then the current that has to flow through your opto diode. Now work out the 32V feed resistor. Plucking figures out of the air, I would start off at 100K for the 32V feed and 10K collector load. Connect them up and see what the collector voltage is, if its less then .5V thats it! , if its more, reduce the 100K / increase to 10K.
Frank