Sen. Arlen Specter (R-Pa.), the new chairman of the Senate subcommittee that oversees the District of Columbia budget, went on a special tour of the city yesterday with Mayor Marion Barry as guide, and at the end of it proclaimed himself "a strong ally" of the city.

They went to housing and redevelopment projects, a job-finding program for ex-convicts, a high school in Southeast and the new D.C. Convention Center. Afterwards, Specter said the District is a good place to try out new programs to revive the country's older cities, since the effects here are so visible to Congress.

"The District has a unique role because its successes are immediately apparent to Congress," Specter said. "The mayor has a strong ally because I am very concerned about the problems of the cities. The District can be used as a model for . . . other cities."

Specter, who requested the tour during a recent lunch with the mayor, has said he intends to follow the course set by his subcommittee predecessor, Sen. Alfonse M. D'Amato, the conservative Republican from New York who became an unexpected friend to the overwhelmingly Democratic city.

The housing projects on the tour were intended as examples of the best and the worst the city has to offer. The "best" was represented by the James Creek town houses at Second and N streets SW and by the financially troubled Bates Street redevelopment project near Florida Avenue and North Capitol Street.

The city so far has put $8.8 million of grants and loans into Bates Street, or more than $97,000 per renovated home. Despite the cost, Barry said yesterday it was worth it and that he would like to try the same kind of project again, "now that we know how to do it better."

As an example of the "worst" kind of public housing the city has, the mayor took Specter to the 284-unit Greenleaf high-rise at Delaware Avenue and M Street SW. The elevators weren't working, stairwells were strewn with glass and orange peels, and graffiti covered the hallway walls. The roof leaks and the top two floors of the eight-story building are vacant.

Barry revealed that the city plans to convert the two- and three-bedroom apartments at Greenleaf, the city's only high-rise public housing building for families, to one-bedrooms and efficiencies for senior citizens by 1985. Barry said he hoped to get the $14 million necessary to modernize the building, constructed in 1959, from the federal government.

At the tour's first stop, Anacostia High School, the mayor urged all the students in a biology class to get in their applications for some 16,000 summer jobs this year. Because of both federal and local cutbacks, the program will have several thousand fewer positions than last year.

The mayor also took Specter to the offices of Liberation of Ex-Offenders Through Employment Opportunities, a program for helping find jobs for persons coming out of prison, to the O Street Market and to the newly opened Convention Center.

The one source of disagreement expressed between Barry and Specter was over the D.C. Lottery, which Specter opposes. When Barry pointed to the $40 million expected from the lottery in the next fiscal year, up from $26 million, Specter replied, "I'm not sure I'm glad you're getting more."