I strongly urge you to contact the district attorney as soon as possible. However, I recommend that you consult with a local criminal defense attorney before you contact the district attorney to insure that you will not be walking into the prosecutor's office and incriminating yourself.
Contacting the prosecutors office and telling them what you know is the appropriate thing to do. What the prosecutor does with that information is up to them. The prosecutor has the obligation to fairly apply the law.
You should definitely contact the DA and discuss what you know with them. There is no guarantee that they will call off the deal, but you may provide additional information and insight to them that they were unaware of. In fact, many times, plea deals are the result of the DA's belief that they have a weak case. The information you provide could cause them to reformulate their position and reconsider the offer.