We simultaneously determined the physical structure and optical transition energies of individual single-walled carbon nanotubes by combining electron diffraction with Rayleigh scattering spectroscopy. These results test fundamental features of the excited electronic states of carbon nanotubes. We directly verified the systematic changes in transition energies of semiconducting nanotubes as a function of their chirality and observed predicted energy splittings of optical transitions in metallic nanotubes.