Reading an optocoupler datasheet and calculating the resistors for its input/output
A few comments about your assumptions and notes:
1) Your note states that 10mA must flow for broken wire detection.  But using ohm's law and the voltage and resistance values you provided: 
$$I=\frac{V}{R} \rightarrow \frac{27.5V}{26.7kΩ}=.001A\rightarrow 1mA$$
Knowing this much lower "passive" value, make this a bit easier to design with.  So now what you need to do is differentiate between 1mA and 20mA.
Your method is one way to do this, and you can complete it with a zener diode:







simulate this circuit &ndash; Schematic created using CircuitLab

R3 is then calculated as follows:
$$\frac{(27.5V-10V-1.3V)}{20mA}=810Ω$$

So in summary, R2 will provide a path for the 1mA sense current while D2 blocks the opto from turning on.  When the mosfet activates and presents the full 27V to the output, then the zener will break over and conduct while R3 limits the current to 20mA through the opto's LED.