Why don't race bikes have solid front triangles? I know that cutting material out makes a bike lighter, but at some point there must be a crossover between weight and aerodynamics. Since tri-bikes and track bikes have more oval/flat shaped tubes, you'd think that closing off the entire front triangle would improve aerodynamics even more. And making it out of carbon fiber wouldn't add too much weight. See also the use of enclosed wheels.

So, outside of the obvious reasons of weight and the loss of a bottle cage, why wouldn't you want to do this?
Much of this is due to UCI regulations. They specify what shape and size of frame can be used. It is not allowed to add extra parts just for improving aerodynamics.

See the UCI document Technical Regulations For Bicycles - A Practical Guide To Implementation (PDF) which covers most of this.

As it says for Article 1.3.020, the frame elements must be tubular, with a maximum transverse dimension of 8 cm and a minimum transverse dimension of 2.5 cm, in a maximum ratio of 1:3. Also Article 1.3.024 "Protective screens, aerodynamic shapes, fairings or any other device that is added or forms part of the structure, and that is destined or has the effect of reducing wind resistance, are prohibited."

It could be possible to make a more aerodynamic bike that was not allowed by the UCI. But you would be restricted by what races it could be ridden in. A few brands have mode non-UCI compliant race bikes, mostly designed for triathlon. eg some versions of the Specialized Transition or Shiv, which have extra aerodynamic tubes etc.