Cubic to tetragonal phase transition effects on the electronic structures of pure and iron doped barium titanate