D.C. Mayor Marion Barry came under congressional pressure yesterday to beef up a new program to put more criminals who have repeatedly committed violent crimes in jail this summer, even if it means keeping the courts open at night.

"They're not nice people. They should be off the streets," said Sen. Alfonse M. D'Amato (R-N.Y.), who holds the city's purse strings on Capitol Hill as chairman of the appropriations subcommittee on the District.

"If women are afraid to walk the streets . . . that's a terrible way to live," D'Amato told Barry during a hearing on the city's 1983 budget.

D'Amato said testimony from D.C. police Chief Maurice Turner last week inspired his idea and added that he wants the U.S. attorney's office to invoke federal and District preventive detention statutes more often.

Preventive detention laws allow the courts to detain suspects in criminal cases, after complex hearings, until their trials. The hearings are based largely on whether a person has ties to the community and will show up for a trial regardless of the offense. The District law also allows courts to hold suspects who pose a danger to the community in some cases.

D'Amato said he has scheduled a meeting tomorrow with Barry, city police officials, judges and U.S. Attorney Stanley Harris to explore ways "to stop the revolving door" for criminals. He said he would try to find more funds for the U.S. attorney's office and help the city to come up with more funds to keep its courts open at night if necessary.

Barry told D'Amato that the city would cooperate despite severe overcrowding in the city's prison complex at Lorton and at Washington's jail, where officials said there were nearly 500 more inmates yesterday than the 1,365 it was built to hold.

Turner was out of town yesterday and could not be reached for comment, but he has long complained about the ease with which criminals receive pretrial release.

D'Amato said "federal prisons are available to the city" if it needs them. District officials said later that the city now spends $1.6 million a year to house about 1,070 inmates in federal institutions.

Barry said after the hearing that he thought "a couple of hundred" criminals were responsible for a disproportionate number of crimes in the city.

Earlier this year he established an 85-person, career criminal unit in the police department that has identified nearly 1,000 persons who have multiple arrests in the city.

The unit has arrested about 100 persons so far, but fewer than 10 of those have been detained by the courts at the request of prosecutors.

When Barry began talking about "long-term" solutions to crime, such as bail reform and providing more jobs, D'Amato interrupted him.

"I would like to make this a summer program," he said, with results reviewed at the end of July and August.

"If we double the police force, it wouldn't mean a darn thing" unless criminals are "put in jail," D'Amato said. He contended that career criminals are responsible for much of the crime in Washington and are too easily released by the city's courts while awaiting trials.

Harris, who was not at the hearing, said his office also would cooperate with D'Amato but said he doubted that the courts would agree to night sessions.

The politically sensitive issue of bail for suspects has been a longtime sore spot between the police and prosecutors and judges who differ on when the restrictive preventive detention measures should be imposed.

Prosecutors in many cases don't seek preventive detention because the law requires them to bring those cases to trial within 60 days and prosecutors say they are required to reveal too much evidence to defense attorneys at detention hearings.

Correction department officials said yesterday that the District leads the nation in the number of persons incarcerated based on population, with about 800 persons in prison for every 100,000 residents.

In addition to the overcrowded jail, the officials said, Lorton's medium-security complex has about 130 more inmates now than its normal capacity and that its maximum-security facility has 50 extra inmates.

The city built a 398-bed, temporary prison facility last March at its alcoholic rehabilitation facility near Lorton and has already sent 223 inmates there, the officials said.