Pseudopotential Calculation of the Electronic Valence Charge Density and the Optical Dielectric Constant of NaCl and MgO