It was allies-spanking day in the Senate Armed Services Committee yesterday as members parted with their chairman to denounce as too small the defense contribution of West European countries and Japan.

In abrasive complaints, they badgered administration witnesses who had come with prepared statements to join Chairman John G. Tower (R-Tex.) in praise of much of the North Atlantic Treaty Organization's efforts.

"We never hear anything but rationalizations from you for sticking American taxpayers with the bill for defending Europe and Japan," said Sen. Carl Levin (D-Mich.).

Why, wondered Sen. William S. Cohen (R-Maine), does the United States defend South Korea while another ally, Japan, does a big trade with communist North Korea and builds a huge shipping drydock for the Soviet Union?

The outbursts were the latest manifestation of this year's congressional disenchantment with a huge defense budget, a large part of which helps defend overseas allies whose rates of defense spending are lower than that of the United States.

Early this month, Sen. Ted Stevens (R-Alaska), chairman of the Senate Appropriations subcommittee on defense, threatened to introduce legislation to withdraw U.S. troops from Europe. He was angry at European participation in the construction of a Soviet natural gas pipeline, which, he said, would make Europe dependent on the Soviets for 20 percent of their energy.

So far none of the complaints has resulted in any specific legislation either to withdraw U.S. troops or to cut back U.S. support for European and Japanese defenses. Stevens is still "considering" a troop withdrawal amendment to the defense budget but has not made up his mind, a spokesman for the Republican whip said yesterday. Hearings may be held on the issue in late April, the spokesman added.

The complaints have risen in volume almost in proportion to the deepening recession in this country and to the bipartisan reluctance to vote for large defense spending increases in a budget projecting a $91 billion deficit.

The Soviet-built pipeline to Western Europe and the reluctance of allies there to take a tough stand on Poland have added to the level of congressional irritation.

Before the alliance-drubbing barrage began yesterday, Tower took note of the troop-withdrawal sentiments and acknowledged that some allies "have not borne as much of the common burden of which they are capable . . . . While I am in sympathy with those who desire our friends to do more, we must never forget that Western Europe remains a vital interest of the United States and it is fundamentally in the U.S. national interest to help protect it."

Deputy Defense Secretary Frank C. Carlucci defended the NATO commitment, stating that those countries provide 55 percent of total NATO ground forces, over 50 percent of the combat aircraft and over 35 percent of the joint naval forces. Those allies also contribute extensive "infrastructure," including airfields and U.S. troop billets, he said.

Levin countered with figures showing the average NATO defense spending as a percentage of gross national product had actually declined in the past year despite a 1978 agreement to hold real increases to 3 percent annually. "This administration has let our allies off the hook," said Levin. He also quoted an unclassified report from Carlucci estimating that West Germany will have no real growth in defense spending this year.

Cohen observed that while the United States spends 7 percent of GNP on defense, Europe spends less than 4 percent and Japan less than 1 percent. He and Sen. Gordon J. Humphrey (R-N.H.) noted that the United States is committed to protecting the Persian Gulf and said Europe is more dependent than this country on oil supplies from that region.

They were joined by Sen. Harry F. Byrd Jr. (Ind.-Va.), who at one point said irritably: "I don't understand what this meeting is all about. All you administration witnesses said is how great NATO is."

When Undersecretary of State Lawrence S. Eagleburger informed Byrd that Japan's defense spending is now .93 percent of its GNP and more than 1 percent by NATO accounting standards, Byrd snapped: "That means totally nothing.