A former D.C. police officer was indicted yesterday in D.C. Superior Court on charges that he forged department records during a 2 1/2 year period to collect more than 500 hours of extra pay and time off for court appearances.

In a 158 - count indictment, the grand jury said William P. Jefferson, 33, made up names of defendants and the charges against them and then forged the signature of a nonexistent prosecuting attorney on 79 forms called a "court attendance record."

On some of the forms, Jefferson claimed that he was making his sixth appearance in court on cases that he said involved crimes such as pretty larceny, unauthorized use of a motor vehicle and assault with a deadly weapon, according to the indictment.

Jefferson then submitted the fraudulent forms to the police department, the grand jury said. Knowledgeable police sources said yesterday that the total time claimed by Jefferson would be worth more than $7,500 in overtime pay and compensatory time.

Jefferson, who was assigned to the police department's first district, resigned from the force Feb. 24, according to first district watch commander Capt. James Kirk. Kirk said Jefferson had been a police officer since June 1973. Jefferson lives at 54 Galveston St. SW.

Police officers often appear in court at various stages of criminal cases in which they have been witnesses to crimes, made arrests or assisted other police officers.

The officers are required to complete attendance forms on which they state the name of the case, the charge, the reason for the court appearance and the number of hours spent in court. Clerks at the police department then determine the amount of money or compensatory time owed the officer.

If they are required to be in court during off-duty time, the officers are given compensatory time for the first court appearance on a case and time-and-a-half pay for each additional appearance on the same case, officials said yesterday.

According to the indictment, Jefferson filed for compensatory time on some of the fictitious cases and then filed for overtime pay for additional appearances on the same cases - none of which existed.

The grand jury charged Jefferson with 79 counts of forgery and 79 counts of uttering in connection with the fraudulent forms that were submitted to the police department between August 1975, and last February.

If convicted, Jefferson faces up to 10 years in prison on each of the 158 charges, the U.S. attorney's office said.