If your video card supports sending digital audio over DVI (many do, but not all), then you can get a DVI to HDMI adapter. Of course if you didn't get one of these with your video card, there's a very good chance that this feature is not supported, but it'll probably only take you a few minutes to confirm one way or the other.
A toslink or optical cable is really only needed if you want to do digital audio, like surround sound. Since you're going straight to your TV, there's no real point in this, unless it's a REALLY high end set with a set of 5.1 speakers inside it. A feature that seems to have gone by the wayside with the drive to make sets ever thinner, lighter, and use less energy.
The problem most people run into with trying to connect their computer to their TV, is that they don't realize you can't mix and match inputs on a TV like you can a receiver. A TV has a set of hardcoded assumptions as to where the audio stream will be coming from given a particular video input. Most people, like yourself, just rush into this blindly without doing your homework first, then you look for some kind of band-aid fix to salvage what you've already done, and there usually isn't one.
So I'd say you have two primary choices here.
#1: Use a DVI-HDMI adapter if your video card supports that, and if not, get a video card that does (if you're trying to connect a laptop, and it doesn't support SPDIF via DVI forget this option)
#2: Get a receiver of some sort to sit between your computer and TV, and handle the mixing and matching of different input streams to be sent to the TV