D.C. Deputy Mayor Carol B. Thompson testified for more than an hour yesterday before a federal grand jury that for 14 months has been investigating expenditures from several special funds controlled by Mayor Marion Barry's office.

Thompson was Barry's chief of staff for eight months before being named deputy mayor for economic development in January. Last year she directed an internal city review that found that nearly one-third of Barry's expenses during the previous four years was paid with funds intended for use by other city officials and agencies.

Sources said Thompson's subpoena indicated she might be questioned about several types of criminal violations, including possible bank fraud and witness tampering. Neither Thompson nor Special Corporation Counsel Eric Washington, who accompanied her to the U.S. District Courthouse, would answer questions yesterday about her testimony.

Thompson conducted the internal review in August 1986 after information about Barry's expenses was released at the request of The Washington Post.

The records were later subpoenaed for the grand jury inquiry being conducted by Assistant U.S. Attorney Daniel Bernstein.

In a letter to a Post attorney at the time the records were released, Thompson said the review had determined that Robert Robinson, then Barry's chief administrative officer, had failed to keep proper records.

As a result of the review, Robinson was transferred from his post and Barry repaid $4,791 for expenses he incurred in Washington that lacked proper documentation and for three personal out-of-town trips, including one taken in 1983 for which the city had paid.

Robinson has testified before the same grand jury, and three weeks ago Barry aides found in a District Building kitchenette several boxes containing as many as 10 detailed ledgers kept by Robinson. The documents were later examined by FBI agents.

The grand jury inquiry, which is focusing on whether city funds were used to pay Barry's personal expenses, has also uncovered instances in which money from the special funds was used to assist Barry aides and one incident in which $1,500 may have been used to make a payment on a fur coat for Barry's wife Effi.

Former Barry press secretary Annette Samuels borrowed $500 from the mayor's ceremonial fund in 1985 to buy an airline ticket for her son, who had run out of money in Europe. Samuels said she repaid the money two weeks later.

In addition, Anita Bonds, a key political adviser to Barry, received $1,500 from Robinson in 1984 and repaid the money four days later, according to Bonds, who said she was unaware until recently that the money came from the mayor's ceremonial fund.