The District of Columbia will pay for prescription eyeglasses, routine podiatry care, wheelchairs and crutches for Medicaid patients at least through September, and city officials said yesterday they hope to save the services in the next fiscal year.

The city had planned to eliminate these and some other "optional" Medicaid services this year and next in budget cuts. The plan had angered low-income elderly people and their advocates, who launched an intense lobbying campaign against the cuts.

Mayor Marion Barry said in a statement that he is delighted to be able to continue providing the optional services a result of an agreement the city reached recently with 12 Washington hospitals on capping Medicaid payments. That agreement will save more than $17 million in costs, he said.

If the city is to continue to fund the optional services in fiscal 1984, it will have to get the same kind of Medicaid cap agreement with the hospitals for next year, said Peter Coppola, chief of the D.C. office of health care financing, at a meeting yesterday of the mayor's Commission on Aging.

Advocate groups who had lobbied for continuation of the optional services expressed relief that the services are no longer in danger this year, but some said they were concerned that a question remains about fiscal 1984. The D.C. City Council's fiscal 1984 budget directed the city not to cut the optional services.

"It sounded like that decision by the City Council wasn't necessarily going to be respected," said Cheryl Fish of the Coalition on Financial Accountability, adding that the proposed cut in services in fiscal 1983 was only made known recently and was not a part of the City Council's fiscal 1983 budget deliberations.

But city officials and others said there is a good chance of getting another Medicaid cap agreement next year if this year's cap works out as planned. The hospitals have estimated they would lose less under the agreement than they would have if the city had proceeded with an alternate plan to impose tougher guidelines on costs. The cap limits the total amount the city must pay for Medicaid care.

Council Member Polly Shackleton (D-Ward 3), chairman of the human services committee, expressed satisfaction over the agreement, saying through a spokeswoman that she believes that services must be continued.