Why place a diode in series with the LED in an optocoupler?
If you look at the datasheet there is one possible explanation



0.9V is quite high for a "low output". If you then considered a CNY17 optcoupler at high temperature. this could be enough to permit ~ 400uA to flow... doesn't sound much does it?  but IF Vcc is relatively high, the dark current of the phototransistor would be higher and thus there could be the possibility of an unwanted output change. 

Without knowing specifics of this PARTICULAR implementation (operating temperature etc) it would be safe to assume the extra diode is there to mitigate this "low voltage" output