Optocoupler to drive LEDs (maybe with transistor)
When in doubt, check the datasheet:

https://www.futurlec.com/Datasheet/LED/PC817.pdf

The datasheet has two key pieces of information pertinent to your use-case


Collector current - 50mA
Collector-Emitter voltage - 35V


Your use case is targeting 150mA and thus this part is not suitable. Likewise you are stating this is powered from 220V (thus a peak of ~310V) yet this part has a Vce of 35V

Basically this part is not suitable for direct blocking.

A suitably rated FET would be. However... It isn't that simple. I have included an example circuit WITHOUT values as working with main potential isn't something you should do, unless you know what you are doing 

The FET needs to have a blocking potential greater than the maximum DCLink voltage. It must be able to sink your target LED current. 

The Zener is acting as a crude voltage regulator to limit the voltage applied to the gate. The resistive chain is dropping the vast majority of the DCLink potential.







simulate this circuit &ndash; Schematic created using CircuitLab