Measurement of surface electric fields by an excited-state atomic beam technique