HOUSTON ?? BP, the British oil company, said Thursday that it had agreed to pay $4.5 billion in fines and other penalties and to plead guilty to 14 criminal charges related to the rig explosion two years ago that killed 11 people and caused a giant oil spill in the Gulf of Mexico.