William O. Baker , a prominent scientist and a former head of Bell Laboratories who advised five presidents on scientific affairs , died on Monday in Chatham , N.J . He was 90 and had lived in Morristown , N.J. , for many years .