President Carter lashed out at the House of Representatives yesterday for its rejection of his standby gasoline rationing plan, and he challenged Congress to develop its own plan in the next 90 days.

Standing behind his desk in the Oval Office, the obviously angry president said he was "shocked and embarrassed for our nation's government" by the vote Thursday in the House. He said House members had "put their heads in the sand" as a response to the country's energy shortage.

On Capitol Hill, House leaders predicted that meeting Carter's challenge would be extremely difficult, if not impossible.

"energy is the most difficult issue facing us on which to reach consensus," said House Majority Leader Jim Wright (D-Tex.) "it is particularly vulnerable to regionalism, a subject on which people give loyalties not to the nation but to part of it . . . I don't know how we regroup."

In another energy-related development yesterday, Attorney General Griffin. Bell ordered an antitrust investigation of a threatned four-day shutdown of gasoline stations in several sections of the country to protest Energy Department regulations on profit margins. (Story, Page A4.)

Neither Carter nor his top aides would say what the administration will do if Congress fails to meet the challenge laid down by the White House. And, privately, officials conceded that they expect Congress to fail.

Carter's attack on the House and challenge to Congress thus appeared to be less a tactic to achieve standby rationing authority than an attempt to focus public anger about the worsening gasoline shortage on Congress.

"We can't make them enact a plan," one official said. "But the responsibility is now theirs. Perhaps the attitude and climate will change. And perhaps it will be constructive for those who voted not to consider for a few days the consequences of those votes."

"After yesterday's vote, it would be very difficult," said Rep. John D. Dingell (D Mich.), chairman of the House Commerce subcommittee that would manage the legislation. "There is heavy sentiment against rationing at all . . . We'll take a look at what can be done. The prospects of doing it in 90 days are not very bright."

The standby rationing plan Carter submitted to Capitol Hill was required by 1975 Under the 1975 measure, the standby plan had to be approved by both the House and Senate before the president would have authority to develop rationing mechanisms.

The administration amended its original plan twice to try to placate competing interests in the Senate and gain Senate approval. But the House, in a surprising vote Thursday night, rejected the amended plan by a 246-to-159 vote. It was a fiercely partisan fight, with only seven of the 159 House Republicans voting for the plan. But Carter also lost the support of 106 democrats.

The White House withheld reaction to the defeat Thursday night, saving its fire for yesterday's appearance by the president. Reporters were called to the Oval Office to record the reaction, some of which Carter read from handwritten notes.

Describing the House action as irresponsible, the president said, "The only conclusion that I can draw is that in spite of the strong leadership the majority of the House members are unwilling to take the responsibility, the political responsibility for dealing with a potential serious threat to our nation.

"If we should have a serious interruption of oil and gasoline supplies," he continued, "our nation would be unprepared to deal with it. We would be in a vulnerable position, and I would have no authority at all to meet what could be a national crisis."

Carter added:

"This question indicates, and I hate to say this, that a majority of the House of Representatives has been willing to put local or parochial interests [first] and let political timidity prevent their taking action in the interest of our nation."

The proposal that was rejected by the House would have permitted the administration to write a detailed rationing scheme within the broad framework of the general plan. Carter and his aides have said repeatedly that they do not expect ever to impose a rationing plan, which would have to be approved by Congress to go into effect. But they have argued that it is folly not to have such a plan ready in the event of an emergency.

The maneuvering and hurling of charges on the issue came in the midst of serious gasoline shortages in California, the beginning of shortages elsewhere in the country and predictions from the administration that the shortages will spread and become worse over the summer.

In another development, Agriculture Secretary Bob Bergland announced that the Energy Department will begin immediately to allocate as much diesel fuel to farmers as is needed for spring planting requirements.