LIKE RAYMOND Donovan, the former secretary of labor who was recently acquitted of criminal charges in New York, former NASA administrator James Beggs has now been vindicated. Mr. Beggs had been executive vice president of General Dynamics, the nation's largest defense contractor. He and three colleagues -- Ralph Hawes, David McPherson and James Hansen -- were indicted in December 1985 on charges of defrauding the United States in connection with a contract for the design, development and delivery of a prototype weapons system. Now a federal judge in Los Angeles has granted the government's motion to dismiss that indictment because the Justice Department concedes it has no case.

It is hard to understand how this case was brought in the first place. Essentially, it was a dispute about whether the billing of certain costs to the government was allowed under the terms of the contract. No money was stolen by private individuals, and the defendants claimed all along that the prosecutors simply didn't understand the accounting procedures that were being used. Defense contracts are typically unlike ordinary buyer-seller agreements, and perhaps they have to be, since the government often covers expenses that in the private world would be considered normal costs of doing business. This General Dynamics contract -- negotiated during the Carter administration -- was not a fixed-price agreement, for example, but one that required the company only to make its "best effort" to deliver a product. The indictment erroneously assumed that the contract could not have allowed the company to spend $39 million and, in the words of one Justice Department official, "deliver a bucket of bolts" if they failed to produce a product. But this apparently is not at all unusual. The billing arrangements, according to an expert consulted only after the indictment was handed up, were "perfectly permissible" and the terms were down in black and white. Who in the Justice and Defense departments, we wonder, was in charge of reading the documents at issue before going to a grand jury?

How do prosecutors go so badly off the track? In this case, it has been charged that pressure from the Hill to get tough on defense contractors led to disastrous overreaction. But prosecutors are too powerful, can do too much harm to innocent individuals, to be allowed a "devil made me do it" defense. This time, to their credit, department officials backed down before trial and publicly confessed error. That is not easy to do, but it's not nearly as unpleasant as being unjustly indicted, losing a job and living under a cloud for 19 months, as Mr. Beggs and his colleagues did.

Usually prosecutors come under fire for not being tough enough, for not aggressively going after alleged wrongdoers and seeking the heaviest penalties. But this and other recent cases also point up the perils of reacting too quickly to public pressures. When indictments are dismissed or juries quickly acquit, innocent lives, as well as prosecutor's reputations, have been damage