Effects of transition metal dopants on the electronic structure of potassium niobate