London-based BP has agreed to pay a total of $373 million in fines for violating regulations tied to a fatal refinery explosion in 2005, operating leaking oil pipelines and engaging in a price-fixing scheme, the government announced Thursday.