The Carter administration threatened yesterday to use its muscle to force production of more gasoline, while the House, frustrated by long gas lines, ordered the administration to give it straight answers on whether there is an oil shortage and if so why.

Assistant Energy Secretary Alvin L. Alm told a House energy subcommittee that if there is no adequate explanation for a decrease in gasoline refining, the department will take oil away from refineries operating too far below capacity and give it to those willing to refine more.

Refineries are operating at 84.5 percent of capacity this week when they should be at 89 percent, he said. In addition to the Energy Department's investigation of refining levels, Alm said President Carter has asked the Justice Department to look into refinery operations.

Alm said DOE could take oil from one refinery and give it to another under its allocation authority. He would not speculate why refiners are not producing to capacity. One historical reason has been that they like to keep inventories up to certain levels. But Energy Secretary James R. Schlesinger Jr. told a news conference Thursday that oil imports have risen unexpectedly.

Alm also blamed the long lines at Washington area gas stations on psychological factors. This area isn't getting less gasoline than other parts of the country; it just panicked, he said. Alm said that if he were a governor he would order minimum purchases into effect as soon as the lines start.

In his testimony, Alm gave general support to House and Senate bills designed to save energy but said they would not be enough to cope with a serious interruption of oil supplies. The administration still wants standby authority to ration gasoline, he said. The Senate approved such authority recently, but the House killed it.

After that defeat Carter said it was up to Congress to come up with a gas rationing plan. But Rep. Toby Moffett (D-Conn.), told Alm the White House was to blame for lack of leadership on gas rationing, and said Carter should invite congressional leaders to the White House to try to agree on a plan. Alm promised to go back and "see if we can't get some movement" on gas rationing.

The House conservation bill, sponsored by Moffett, would prohibit topping off gas tanks by requiring minimum purchases, and would require cars to be left unused one day a week, enforced by displayed stickers showing the off day. The other bill passed by the Senate in effect concedes that Congress can't agree on specific energy conservation programs and asks the president and the states to come up with plans to be put into effect in an energy emergency. The only specific language in the bill forbids the president to order weekend closing of gasoline stations.

Alm said the administration liked the immediate application of Moffett's bill and the broader scope of the Senate bill.

Alm said Moffett's sticker plan could make real savings of gas, about 300,000 barrels a day. But there would be enforcement problems. Stickers might be traded, he said, and some provision would be needed in two-car families to make them pick the same day to leave their cars home or the substantial saving would be lost.

Meanwhile, the House, by a vote of 340 to 4, pushed through a rarely used resolution of inquiry directing Carter to furnish the House with information clearly laying out whether there is an oil shortage. It contains a long list of other questions designed to find out why the American people are waiting in long gas lines and what can be done to end it.

The resolution probably will not produce any information. It was intended more as a political message to the White House that the country is up in arms about gas shortages and something had better be done.

The resolution had been introduced by Republican leaders last month. The energy subcommittee, headed by Rep. John D. Dingell (D-Mich.), sent the questions to Schlesinger and received in response a pile of documents about a foot high. Dingell told the House that, while the mass of paper did not give clear answers, it was all the House can expect from DOE now and there was no point passing the resolution.

But while he was saying the resolution wouldn't do any good, Dingell was kicking DOE for what he called its foot-dragging in developing ways to compile information on oil supplies independently of the industy.

And Rep. Samuel L. Devine (R-Ohio), who began by joining Dingell in urging that the resolution be dropped, ended up saying: "None of us can go home this weekend and tell out constituents we voted against a resolution of inquiry to find out where the gas went." Both finally voted for it.

Carter has 15 days to respond to the resolution.

House Majority Leader Jim Wright (D-Tex.) reported after a meeting with Schlesinger and the president's assistant for domestic affairs, Stuart E. Eizenstat, that the administration will support, with some changes he found acceptable, a bill congressional leaders are backing providing federal aid to encourage commercial production of synthetic fuels, such as turning coal to oil.

Wright said the administration wants the program financed from a not-yet-created energy trust fund. The authorization bill may be put through the House before the Fourth of July recess even though the fund would be created in later legislation.