I had that problem for the longest time playing any games with DX10. Once DX11 came out it went away. However, I'm not even sure STO uses DX10 or 11.
Make sure your video card drivers are up to date.
Also make sure to have the latest build of DX9 installed. Vista & Windows 7 do not update or come with DX9. Any games you install that use DX9 search for and sometimes install some version of DX9. The link below is official M$: DirectX End-User Runtime Web Installer dated 2/5/2010