First-principles calculations on the electronic structure and optical properties of BaSi2