Motions can be passed prior to trial to question the validity of certain charges.
The problem is there are a lot of federal judges who let prosecutors continually change the charges, change the rational for the charges, add on whole new charges in an attempt to force a plea bargin etc...
Bypassing the trial lets the prosecution work in darkness, and darkness invites corruption or incompetency, even if only in the name of getting the job done more efficiently.
I'm thinking out loud here, but maybe the problem isn't the plea bargain, but the pleading process itself. It might be less subject to abuse if the prosecution had to present its evidence before the court and in public, and if the judge could reject the plea and compel a trial.