Theory of 3d Transition Atom Impurities in Semiconductors