The suspect wanted in connection to the fatal shooting of a Massachusetts police officer during a traffic stop was shot and killed after an exchange of gunfire Sunday as authorities closed in on him just a few miles from the initial incident, officials said.