If the TV has optical audio out and the receiver optical audio in you are good to go.
Check the TV and receiver manuals.
You may have to turn the optical audio on, the TV speakers off, and change the audio output type in the TV menu.
You may have to assign the optical input (say optical 1) to an input (TV for example).