A key Senate subcommittee yesterday approved an additional $20 million in federal financing for the District to build a prison in the city and gave Mayor Marion Barry a tight Oct. 15 deadline to award a contract for design and construction -- a deadline Barry pledged he would meet.

The additional money would increase federal spending for the prison to $50 million through fiscal 1988. But Sen. Arlen Specter (R-Pa.), chairman of the D.C. Appropriations subcommittee, said yesterday the city would forfeit $40 million of those funds if it failed to get a construction contract by Oct. 15.

The panel also adopted language endorsing the mayor's proposal for a minimum 700-bed facility near the D.C. Jail, without waiting for the D.C. Council to consider the issue. Barry administration officials said the action would effectively take the council out of the site-selection process, while giving the mayor a formidable timetable to meet.

"This should resolve the issue of the prison site once and for all and allow us to move on to the more serious business of prevention of crime," Barry said through a spokesman. " . . . We will meet the deadlines."

A spokesman for Council Chairman David A. Clarke said Clarke will ask the council's legal experts to determine whether in fact the language would take the council out of the process and approve the mayor's plan.

Earlier, the spokesman said Clarke was "pleased" with the additional funding but expressed concerns about the short period of time for considering the prison plan before a contract had to be signed.

Specter and the subcommittee have been the prime force behind the prison project, having pushed through the first $30 million installment last year after persuading a reluctant Barry to endorse the idea. The full Senate and the House, as well as the Reagan administration, have been willing in the past to go along with the additions in funding Specter has approved in subcommittee on criminal justice issues, including the prison. Yesterday's action now faces consideration before the full committee and then the Senate.

Barry has proposed a 700- to 800-bed facility, costing an estimated $50 million and geared to drug treatment, on the D.C. General Hospital grounds, just southeast of the D.C. Jail. His timetable, which called for awarding a design and construction contract next January, would have to be severely compressed to meet the subcommittee's mandate.

"What the subcommittee has done is to ratify the site selected by the mayor," said Julius Hobson Jr., Barry's congressional liaison. "The money is literally tied to the site."

"We have been frustrated with the pace of the District government" in getting construction of the prison started, Specter said at yesterday's subcommittee meeting. "Valuable time must not be lost."

City Administrator Thomas Downs said he met yesterday with officials of the D.C. departments of Corrections, Administrative Services and Public Works to see if the city can meet the subcommittee's deadline.

"It's a very, very, very tight time frame for a facility of that size," Downs said. "We have to make every effort, if this is the condition, to see if we can do it."

In approving the District's $3 billion fiscal 1987 budget for operating and capital expenditures, the subcommittee endorsed President Reagan's proposed level of federal payment to the District of $444.5 million, unlike the House, which last week approved a payment of $414 million.

In doing so, the Senate panel made several other changes in the budget in the criminal justice area. It specified that $5.5 million be used to renovate and operate existing minimum security bed space to help alleviate crowding in the corrections system while the prison is being built. But District officials said yesterday they could not say just how the money would be used.

The bill includes $7 million to continue an education and training program at the city-run Lorton Reformatory in Northern Virginia and $3.7 million to pay the federal Bureau of Prisons to house D.C. prisoners moved to federal facilities as a result of recent disturbances at Lorton.