To run it in DX8, once you've downloaded TF2, before starting it up, go into your games tab on Steam, right-click TF2, hit properties, then launch options (should be on the first tab), and type in -dxlevel 80 or -dxlevel 81. Once you run the game it'll be in DX8 or 8.1, depending on which you chose. I recommend 8.1, as there's not much difference in performance, but some things certainly look much better with DX 8.1.

Just make sure that after you start the game in DX8/8.1, once you quit, you have to remove it from the launch options to keep your settings in the video tab in options. It'll still stay DX8/8.1, though.