Gasoline shortages will ease substantially as the summer wears on and the targets for home heating oil inventories in the winter will be met, Energy Secretary James Schlesinger predicted yesterday.

Because of increased imports of crude oil and larger refinery runs in recent weeks, Schlesinger said that stocks of heating oil "are now back out of the minimum acceptable range" and on their way to the 240-million-barrel target.

Gasoline inventories have been rising as well, he added, and that should permit an increase in allocations to service stations in August and September.

Schlesinger, in a briefing for reporters, again criticized oil companies for being "too conservative" - first for building up crude oil stocks rather than turning it into gasoline and heating oil and now for keeping more of the gasoline being produced an inventory rather than quickly putting it out for sale.

This month, oil companies have had available for sale about 93 percent or 94 percent of the amount they sold in July, 1978. Schlesinger said this level should rise to 96 percent in August, adding, "With higher crude oil imports, we might see an increase . . . up to 98 percent level."

Most gasoline stations have been getting substantially less than 93 percent of their last year's sales volume - often 80 percent or less - because a portion of the total goes first to a variety of priority users and into "set asides" controlled by the states.

Schlesinger declined to predict an end to gasoline lines everywhere in the country, but said they should not again be as bad as they were in May and June.

The energy secretary confirmed reports that new gasoline price regulations will be announced Monday setting retail dealers' margins at a flat amount per gallon. Other sources say the new margin, which will apply to every station in the country, will be 15 cents a gallon.

Nationally, that will add one cent to two cents to the price at the pump, DOE officials estimated.

Currently, the legal maximum selling price can be different at every station. A retailer's markup must be the same as it was in 1973, plus a variety of allowances for higher rent and other cost increases. In addition, dealers have had the right to "bank" the differences any time their actual selling price has been less than the legal maximum. Some dealers have used those "banks" to sell gasoline legally for $1.50 a gallon or more.

Under the new system, the maximum selling price will simply be the wholesale price the dealer paid for his most recent purchase of gasoline plus 15 cents. The legal maximum, therefore, will be the same for all stations selling a given brand in an area since they will normally be paying the same wholesale price.

The new regulations are being adopted under an accelerated procedure, with public hearings being held as late as yesterday.

The changes in the regulations, which probably will be made retroactive to Sunday, are primarily the result of complaints by full service dealers that the present limit on margins, coupled with low allocations of gasoline, are driving them out of business. Several dealer groups have threatened strikes.

Another demand of the dealers will be met Sunday. In a separate regulatory proceeding, an initial allocation of 40,000 gallons a month will become the maximum a new station can receive.

The dealers have been complaining that the regulations allow the oil companies to open new "gas-and-go" stations with extremely high allocations. Since few new stations can be profitable with less than an 80,000-gallon allocation, experts say, the change means that few new stations can be opened. CAPTION: Picture, JAMES SCHLESINGER . . . again hits oil companies