The choice of the optimum semiconductor for manufacturing thermophotovoltaic (TPV) cells is not straightforward. In contrast to conventional solar photovoltaics (PV) where the optimum semiconductor bandgap is determined solely by the spectrum (and eventually the irradiance) of the incident solar light, in a TPV converter it depends on the emitter temperature and on the spectral control elements determining the net spectral power flux between the TPV cell and the emitter. Additionally, in TPV converters there is a tradeoff between power density and conversion efficiency that does not exist in conventional solar PV systems. Thus, the choice of the proper semiconductor compound in TPV converters requires a thorough analysis that has not been presented so far. This paper presents the optimum semiconductor bandgaps leading to the maximum efficiency and power density in TPV converters using both single junction and multijunction TPV cells. These results were obtained within the framework of the detailed balance theory and assuming only radiative recombination. Optimal bandgaps are provided as a function of the emitter and cell temperature, as well as the degree of spectral control. I show that multijunction TPV cells are excellent candidates to maximize both the efficiency and the power density simultaneously, eliminating the historical tradeoff between efficiency and power density of TPV converters. Finally, multijunction TPV cells are less sensitive to photon recycling losses, which suggest that they can be combined with relatively simple cut-off spectral control systems to provide practically-viable high performing TPV devices.