Diamond silicon (Si) is the leading material in the current solar cell market. However, diamond Si is an indirect band gap semiconductor with a large energy difference (2.3 eV) between the direct gap and the indirect gap, which makes it an inefficient absorber of light. In this work, we develop a novel inverse band structure design approach based on the particle swarming optimization algorithm to predict the metastable Si phases with better optical properties than diamond Si. Using our new method, we predict a cubic Si(20) phase with quasidirect gaps of 1.55 eV, which is a promising candidate for making thin-film solar cells.