The only way the roku tv remote will control the soundbar is by hdmi-cec, which you do not have using the optical cable. If you want to use the optical you will need an universal remote that does soundbars and roku tv's. Like the One-For-All urc-7935.
Edmund
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.