John Lamar Ray, a 34-year-old black Justice Department lawyer who said he quit his job to campaign, announced yesterday that he is a Democratic candidate for mayor of Washington.

The chairman of the D.C. Democratic State Central Committee and the City Council member from Ray's sixth ward said they had never heard of him.

That didn't surprise Ray. He said he had no apologies to make for not showing up at such things as "political cocktail parties" and would work 18 to 20 hours a day knocking on doors and campaigning to shed his political anonymity.

Ray, who said he pulled himself up from youthful poverty in rural Georgia, is the first candidate to announce for mayor in the 1978 race, although other, better-known political figures are known to be waiting in the wings.

Robert B. Washington, chairman of the D.C. Democratic State Committee, told a reporter that he has never heard of Ray. Neither has ward six City Council member Nadine Winter.

Ray, who announced his candidacy at a press conference in Lincoln Park, concedes that he has never before run for political office, nor is he a member of any political or civic organizations. But to him that doesn't matter.

"If we think that good leadership is dependent upon working one's way up the (political) ladder, I say look at the present city administration," Ray said.

Ray said he would live on his savings during his campaign effort, and would offer position papers on what he considers to be the city's four biggest issues - housing, unemployment, the need for job training and aggressive economic development.