The United States and its allies built almost twice as many warships as the Warsaw Pact nations did during the 1970s, according to Sen. Carl Levin (D-Mich.), who yesterday criticized Navy Secretary John F. Lehman Jr. for calling that period "a decade of neglect."

Levin, who cited a Library of Congress study, also said he had asked the General Accounting Office to determine if the Navy had underpriced its current shipbuilding program by directing officers to use the "most optimistic estimates" in arriving at price tags for ships. That direction was given in an internal Navy memo.

Speaking on the Senate floor about the Library of Congress report entitled, "United States, Allied and Soviet Naval Ship Acquisitions," Levin said:

"A close analysis of this report shows that during the decade of supposed neglect the United States and its allies outbuilt the Soviets and their allies 200 ships to 109 in the major categories of ships directly related to an ability to wage a conventional war on the high seas."

He gave this comparison of ships built from 1970 to 1979 by the United States and its allies and the Warsaw Pact:

* Warships of 3,000 to 5,000 tons, mainly frigates: 80 by the United States and its allies to 21 by the Warsaw Pact.

* Warships of 5,500 to 8000 tons, mainly destroyers: 26 to 9.

* Warships of 8,000 tons and up, mainly cruisers: 5 to 7.

* Large aircraft carriers: 2 to 0.

* Medium aircraft carriers, 30,000 to 60,000 tons: 0 to 2.

* Attack submarines: 87 to 70.

Contending that the Reagan administration has exaggerated the Soviet naval threat and has launched the United States on the wrong kind of shipbuilding program, Levin, a member of the Senate Armed Services Committee, called on Congress to rescind its approval "of one, if not both" of the Nimitz class nuclear carriers authorized last year.

Sen. Ted Stevens (R-Alaska), chairman of the Senate Appropriations subcommittee on defense, said recently that Congress may have to stretch out construction of one of those carriers to bring the Pentagon budget under congressionally imposed ceilings.