President Carter announced the names of five men yesterday who have been recommended to him to head the FBI and said will probably select the next FBI director from among the five.

The men, recommended to the President by a special commission he named last February, included two judges, a California district attorney, a 25-year veteran FBI agent and the black sheriff of Wayne County, Mich., which includes Detroit. They are:

John J. Irwin Jr., 47, an associate justice of the Massachusetts Superior Court since last August and a former prosecuting attorney in Massachusetts.

William Lucas, 49, the sheriff of Wayne County since 1969 and a former Justice Department lawyer and FBI agent.

John K. Van de Kamp, 41, the elected district attorney of Los Angeles County who has been active in Democratic politics in California.

Neil John Welch, 50, a career FBI agent since 1951 who now heads the agency's Piladelphia office.

Harlington A. Wood Jr., 57, a judge of the Seventh U.S. Circuit Court of Appeals in Chicago, a former Republican National Committee staff aide and former acting assistant attorney general during the Nixon administration.

Carter opened a nationally televised press confernce yesterday by announcing the names of the five. He said the FBI selection panel that he had named in February chose the five from about 230 persons who were initially screened and from a smaller group of 45 or 50 who were interviewed by the panel.

The nine-member selection committee is headed by Irving S. Shapiro, the chairman and chief executive officer of E.I. du Pont de Nemours & Co. Its members include the current FBI director, Clarence M. Kelley, who has said he plans to retire next January.

There were two unusual things about the President's announcement yesterday. The first was that it was made at all. Carter has named other selection commissions - for example election, not the others recommended by the panel who were passed over. By publicly naming the five, however, the President assured the broadest possible scrutiny of the FBI nominees.

In addition, Carter carefully left open the possibility that the the final choice will not come from the five people recommended by the selection group. He said he will make his choice after the five candidates are investigated and interviewed by him and Attorney General Griffin B. Bell.

"We may or may not choose one of these five, but the likelihood is that we shall," the President said.

Irwin, a graduate of Boston College and Boston College Law School, began his career in 1959 as an assistant district attorney in Middlesex County, Mass. From 1970 until he became a Superior Court Judge last August he was the chief of the criminal bureau in the Massachusetts attorney general's office. Irwin is the only one of the five with noexperience in the FBI or other units of the Justice Department.

Lucas earned his law degree from Fordham University 10 years after graduating from Manhattan College in New York. In the meantime, he worked as a teacher, welfare worker and police officer in New York City. Lucas' other experience includes work in the Justice Department in Washington, with a U.S. Civil Rights Commission investigation team in Florida.

Van de Kamp, the youngest of the nominees, is a former assistant U.S. attorney who held various positions in the Justice Department, both in California and Washington, from 1960 to 1969. In 1967 he was an unsuccessful and was later active on behalf of other Democratic political candidates. He was the federal public defender in Los Angeles from 1971 to 1975, when he became district attorney.

Welch, who began his career with the FBI in New Haven, Conn., is known as an independent agent who has not shied from dissenting with his superiors, according to Justice Department sources.