An Alexandria grand jury indicted a Northern Virginia physician yesterday on a charge of unlawfully prescribing controlled drugs during a three-year period to a Fairfax County woman who died in August of a heroin overdose.

The charge was filed against Dr. Joel T. Koslow, 46, a specialist in internal medicine practicing at 4921 Seminary Rd., Alexandria.

He has been under investigation by area police and health officials since investigators found in the dead woman's home massive quantities of prescriptions they said were written under Koslow's name.

Nancy Moffitt, 33, died Aug. 9 after being injected with a lethal dose of heroin in her home at 2224 Pimmit Run Lane, according to Fairfax police.

A week later police charged Donald J. Munley, 33, of 860 S. Greenbriar St., Arlington, with involuntary manslaughter for allegedly injecting the lethal dose.

If convicted on the charge of distributing drugs for nonmedical purposes, Koslow faces up to 40 years in prison and a fine of $25,000, according to Assistant Alexandria Commonwealth's Attorney Randolph Sengel.

Sengel said a bench warrant will be issued by an Alexandria Circuit Court judge today.

For the three years before her death, Moffitt obtained more than 2,750 doses of controlled drugs, including Biphetamine, Quaalude, and Percodan.

Koslow's name was signed to each of those prescriptions, according to an affidavit filed in Alexandria Circuit Court by William A. Hurst, an investigating officer for the Virginia Department of Health Regulatory Boards.

Koslow, a member of Alexandria Hospital's medical staff for 13 years, was seeing patients in his office yesterday, his secretary said. He declined to comment on the charges.

A hospital spokesman said Koslow can continue attending to patients there as long as he holds his medical license.

The Virginia State Board of Medicine placed Koslow on "indefinite probation" last week, said Executive Secretary Eugene Dorson. After the board completes its own investigation, it will reconvene to decide whether to revoke the physician's license.

Meanwhile, he may continue to see patients, but is forbidden to prescribe any controlled drug, Dorson said.

Blair D. Howard, Koslow's attorney, acknowledged that Moffitt was a patient of his client, but declined to comment on the doctor's relationship with the woman.

The court affidavit says that investigators found in the dead woman's home, auto repair bills signed by Moffitt using Koslow's professional account, and letters written on Koslow's stationery.

One letter dated New Year's Eve, 1982, began: "I want you to know how special you are, how much I miss and care for you and love you."

Carol K. Itzerow, a spokesman for the Fairfax County police, said the police are treating the woman's death as a separate investigation from Koslow's criminal case.