Electronic and optical properties of BaTiO3 across tetragonal to cubic phase transition: An experimental and theoretical investigation