BOSTON — CVS Pharmacy has agreed to pay $3.5 million to settle allegations that dozens of its Massachusetts pharmacies violated federal law by filling forged prescriptions for addictive painkillers and other controlled substances. U.S. Attorney Carmen Ortiz announced the settlement with the Woonsocket, Rhode Island-based drugstore chain Thursday. CVS says it entered into the agreement