The Justice Department and the Drug Enforcement Administration announced a $50 million settlement with Walmart Inc. to resolve allegations that the company's pharmacies illegally filled thousands of invalid prescriptions for opioids and other controlled substances, in violation of the Controlled Substances Act.