The Justice Department yesterday assailed the criminal investigation of the Iran-contra affair as being too expensive, denounced the independent counsel system as unconstitutional and said it would ask President Reagan to bury it by vetoing its proposed reauthorization.

Assistant Attorney General John R. Bolton delivered the blistering, unprecedented attack on the independent-counsel law in a letter to Congress that he said had been cleared at the White House. He followed up with equally outspoken remarks at an afternoon news conference.

Bolton criticized independent counsel Lawrence E. Walsh for spending $32 a square foot on office space for the Iran-contra investigation, attacked another independent counsel, Whitney North Seymour Jr., for subpoenaing the Canadian ambassador "in defiance of the most basic principles of diplomatic immunity," and accused a third independent counsel, Alexia J. Morrison, of "unconscionable delay" in her still unresolved, year-long inquiry.

"Recent developments have confirmed our constitutional concerns about the dangers inherent in the operation of the independent-counsel statute," Bolton said in the letter to Sen. Carl M. Levin (D-Mich.), the leading Senate sponsor of reauthorization. " . . . It has become abundantly clear," Bolton wrote, "that the law creates an opportunity for abuse of prosecutorial power that our constitutional system cannot and must not tolerate."

The prime target of Bolton's letter was the measure Levin and Sen. William S. Cohen (R-Maine) have introduced to make the law permanent with amendments to thwart what they call the administration's "guerrilla warfare" against the law. The statute, first enacted in 1978 to handle criminal allegations against high-ranking goverment officials, will expire in January unless Congress renews it.

"This is the first direct assault by the Justice Department against the independent-counsel statute," Levin responded in a statement and later news conference, "but the department's position against reauthorizing the law, sadly, comes as no surprise. The department would have us return to the days of Watergate and {President Richard M.} Nixon's 'Saturday night massacre' when public trust in our criminal justice system hung in the balance. We don't want to go to the brink again."

Bolton also cited the 1973 "Saturday night massacre" -- when Nixon fired Watergate special prosecutor Archibald Cox for insisting on access to Nixon's White House tape recordings -- as a lesson that no president would repeat. Cox's dismissal triggered the first demands for Nixon's impeachment and Bolton maintained that such sanctions -- rather than the legal constraints of the independent-counsel law -- should be sufficient.

According to Bolton, the department's main constitutional objection is the exception the law carves out to what he called "the constitutional imperative that all federal prosecutors must be accountable to the president." The statute sets up a special three-judge federal court to appoint independent counsels and provide continuing supervision.

"To the extent that the present statute authorizes a prosecutor to investigate and prosecute federal crimes without such accountability, and makes such a prosecutor subject to the direction and control of a court rather than the executive, we believe it is unconstitutional," Bolton said. He said that if Levin's bill is passed, "we will have no choice but to recommend its disapproval by the president."

Aides to Levin said his nine-member Senate Governmental Affairs subcommittee is being polled by letter this week and will probably approve the bill by Friday. A similar measure sponsored by House Judiciary Committee Chairman Peter W. Rodino Jr. (D-N.J.) is pending in the House.

"These independent counsels, as presently operating, are utterly without review . . . utterly without supervision," Bolton protested to reporters at the news conference. "Nothing is too trivial for these people to investigate. And the proof of that lies in what we already know about their expenditures."

He said Walsh, appointed in December, has already spent $1.3 million; James C. McKay, appointed in February to investigate former White House aide Lyn Nofziger and now, Attorney General Edwin Meese III as well, $223,000; Seymour, appointed last year to investigate former White House deputy chief of staff Michael K. Deaver, $478,000, and Morrison, appointed last year to investigate former assistant attorney general Theodore B. Olson, $548,000.

Bolton estimated that expenses for all six independent counsels now "in full swing" -- including two sealed appointments -- would hit $6 million this year. He singled out the Walsh investigation's $59,808-a-month downtown Washington offices, two-year lease, option to renew for a third, and a square-foot cost close to the highest in the federal government.

Noting Walsh was long "a member of a very prominent, prestigious Wall Street law firm" in New York where legal "life styles" are expensive, Bolton said, "I think it's open to question whether that life style is appropriate for an independent counsel."

Walsh spokesman Dennis Feldman said their offices were picked by the General Services Administration. "GSA signed the lease," he said.