Exchange-correlation potential for one-electron excitations in a semiconductor