Transformer temperature rating
The transformer rating of 29mA means that you can draw about 8mA maximum with the half-wave rectifier you have! You are exceeding the rating of the transformer, and by a considerable margin. 

Suggest you use a full wave rectifier, connect the LEDs in series, and draw less than 18mA from the DC. 







simulate this circuit &ndash; Schematic created using CircuitLab

If the opto LED might get disconnected (perhaps it goes through a connector) you could put a blue indicator LED across the opto output wires. That way both the green and blue LEDs will light up if the opto is disconnected while power is applied (as opposed to the green LED simply remaining dark). The blue LED would not affect the opto under normal conditions.