Electronic and Optical Properties of d-Band Perovskites