The unwelcome sight of the longest gasolines lines since last July surprised many area motorists yesterday as the few service stations open drew down on the lst of their October allocations.

Queues of nearly 40 cars idled outside the Amoco station at 7830 Old Georgetown Rd. in Bethesda at mid-day yesterday. Motorists waited 45 minutes at a Citgo station at 4326 Wisconsin Ave., and there were sporadic reports of block-long lines in Prince George's County.

In Virginia, Arlington County police reported some problems with motorists driving the wrong way on one-way streets to line up for gasoline, but described lines at the pumps as minor. A spokesman for the Red Top Cab Co., which serves Northern Virginia, said his drivers were reporting waits of up to 30 minutes in lines at some Fairfax County stations.

"We had predicted there would be lines this weekend; it's been tight all month," said Vic Rasheed; executive director of the Greater Washington and Maryland Service Station Association. "I'm surprised they weren't bigger."

The apparent shortages could be a weekend phenomenon, although some professional observers are hedging their predictions of what drivers will face in November and December when fuel allocations to stations will be calculated on the basis of 1977 consumption levels.

The quotas for each station in recent months have been based on the amount of gasoline purchased by the stations last year. The effect of the altered standard, which results from publication of a new regulation by the Department of Energy, is uncertain Rasheed said.

The authoritative gasoline marketing publication, "The Lundberg Letter," projected that supplies in October, when many motorists traditionally take to the road to enjoy the fall foliage, would fall short of demand by the same margin as they did in July, when many area residents languished in long lines.

Some service stations reported lines last weekend, and heavy demand on Saturday.

Rasheed said it would have been worse if the weather had been better and more people had gone sightseeing.

Although supplies are tight, the lines may be the result of widespread Sunday closings, rather than a lack of gasoline.

"If this were a weekday you could pull right up to the pump," said Kevin Callahan, an attendant at the Old Georgetown Road Amoco station, where at least three motorists ran out of gasoline while waiting. "If everyone else was open, I know we wouldn't have this line," Callahan said.

But the American Automobile Association estimated last week that 31 percent of the metropolitan area's 1,500 stations would be open yesterday.

"That's down a little bit from last week, but not much," said AAA spokesman Johnathan White. "And most station owners said they would close in the early afternoon." The AAA said that that's the best estimate available of the number of stations actually open yesterday.

One motorist filling up at Citgo on Wisconsin Avenue said he had to drive from M Street to the District line to find gasoline. 'I figured it'd be no problem." said the man, who declined to give his name. "When I read about the oil company profits, it burns me up. But I'll pay anything for gas."

Bob Srour, a student at the University of Maryland, said he had driven the length of Rockville Pike looking for an open station. "This is the first time I've waited in line since the summer," he said. "I'm trying to ride my bike as much as possible."

Thoses trapped in lines worried about them getting longer.

"Don't write a story," said Charles Peterson, who said he had to fill up because his sone had taken the car to the Walter Johnson High School prom. "If you write a story, there'll be 15,000 people in the line.