A top federal energy official announced several steps yesterday that he said could bring more fuel supplies to the Washington area later this summer.

But the fuel-starved area nevertheless headed toward the long Fourth of July holiday period with little hope of relief from long gasoline lines and closed service stations.

John F. O'Leary, deputy secretary of the Department of Energy, told members of the Washington area congressional delegation that among other measures the department plans to:

Issue an order today to governors encouraging them to use their full state emergency "setaside" or supplementary fuel supplies to help areas with shortages, including the Washington suburbs.

Press heretofore reluctant oil companies to use their discretionary authority to transfer up to 5 percent of their state allocations from surplus areas, largely rural, to shortage areas, mainly hard-hit metropolitan centers such as Washington and Baltimore.

Although these could limited relief in July, the immediate outlook for this weekend is bleak.

According to an American Automobile Association survey, gasoline availability should be about the same as last weekend in the Washington area - 60 percent of the service stations will be open for at least part of the day early Saturday, with most closing before 6 p.m. Only 5 percent of the stations will be open Sunday.

The crunch should be intensified, however, because of increased traveling by vacationers and other motorists who combine the weekend with the Fourth of July holiday period. The AAA said it does not know how many of the area's 1,500 service stations will be open next week during the holiday period.

There was one bright spot for the weekend. Shell Oil Co. announced yesterday it will advance 2 million gallons of gasoline to its 250 stations in Maryland. Shell offered to deliver 8,000-gallon truckloads to each station that has used up its June allocation and asks for more.

However, Shell spokesman Tom Denman said, the new supply will count against the dealer's July allocation. "It's a Band-Aid. It's not extra gas," he said.

With the two days in June still to go, many service stations reported yesterday they have already run out of their June allocation and will not start pumping gasoline again until their first July deliveries arrive, some as late as next Thursday.

Allen Smith at Scott's Mobil Service Center, 4501 Bowen Rd. SE, said his station ran dry two weeks ago and won't get any more gasoline until July.

James Morales, manager of Oak Crest Gulf at 5520 Marlboro Pike in Hillside, said he ran out last Monday and has no idea when he'll get more. He said a Gulf representative told him. "You'll get it when you get it." Morales said that may not be until July 7.

In a wide-ranging hearing before the Washington area congressional delegation, O'Leary said the nation as a whole is suffering a true shortage of gasoline - caused by a shortage in crude oil imports - and that metropolitan areas such as Washington are victimes of "misallocations" and poor national planning.

Under sharp questioning by some of the legislators, O'Leary denied that the oil industry and the Carter administration are conspiring to permit the oil companies to withhold gasoline to drive up prices.

"If you're looking for a scapegoat," O'Leary said, "OPEC (Organization of Pertroleum Exporting Countries) is the villain in this piece."

Also, he said, a preliminary audit by the energy department of reported surpluses at oil company bulk storage tanks in Fairfax County indicates no irregularities. The Washington Post reported last week that many of the multimillion-gallon tanks were so full that new pipeline shipments were being turned away.

O'Leary said yesterday that the audit indicated only one shipment was turned away and that was because it had been "misscheduled" by clerical error.

In addition to pressuring state governors and oil companies to use their discretionary authority to transfer available allocations from rural to metropolitan areas, O'Leary said, the energy department is moving on three other fronts to relieve gasoline shortages:

A possible revision of the base period for determining how much gasoline service stations receive. The current formula provides stations with a percentage of what they received the same time last year, with some allowance for growth. The revision would be designed to help metropolitan areas receive larger allotments. An announcement on this will be made on July 6.

A change in the federal pricing formula to increase profit margins for many service station dealers. At the same time, the change would cut uncertainty about pump pricing and allow for more vigilant policing. O'Leary did not say what the increase would be but indicated it would help ward off scattered threats by independent dealers to close their stations in protest against what they say are shrinking margins. The formula change will be issued July 15.

Investigation of complaints that many farmers are abusing their priority access to unlimited amounts of fuel and using it for private passenger cars. If true, O'Leary said, the government could tighten regulations limiting fuel to strictly agricultural vehicles.

Oil companies, fearful of angering retail customers, reacted cautiously to O'Leary's recommendation thay they shift up to 5 percent of statewide allocations from surplus to shortage areas.

Exxon, with 450 stations in the Washington area, would not make any shifts unless requested by a governor, said Exxon spokesman D. R. Taylor.

O'Leary acknowledged that the District of Columbia will not get much relief from such shifts since ther are no surplus areas within the tightly concentrated city.

"Are you saying that we are uniquely penalized because we are in the nation's capital?" asked D.C. Del. Walter Fauntroy.

"In a sense, yes," said O'Leary.

Maryland Gov. Harry Hughes, Virginia Gov. John N. Dalton and D. C. Mayor Marion Barry released some of their emergency setaside gasoline for the city and its surrounding suburbs this month.

O'Leary, however, said the amounts should be increased.