Supreme Court Justice Sandra Day O'Connor told graduates of Georgetown University Law Center yesterday that although they had "fame and fortune ahead" of them, they should never forget that a "great lawyer is always mindful of the social impact" of all decisions.

She told the new graduates that although they would be paid "as much -- or better yet -- more than you are worth," she felt they would gain far more from contributing their services to the needy than they could ever hope to get from money.

In an outdoor speech punctuated by jets approaching National Airport, O'Connor surprised the 825 students, and thousands of their friends and relatives at the 115th graduation ceremony, by heeding her own admonition that the "chief function of a commencement speech is to be brief." She spoke for about 5 minutes.

With 2,700 students, Georgetown has the nation's largest law school, and O'Connor reminded the class of 1986 that rising costs have put legal services beyond the reach of many Americans.

O'Connor, who in 1981 became the first woman appointed to the Supreme Court, told her audience not to fear occasional setbacks. She reminded them that although she was third in her law school class at Stanford in 1952, no major law firm would give her a job.

"If your career path is at all like mine," Justice O'Connor said, "you won't be starting at the top of the ladder."

Since no law firm would hire her when she graduated, she opened a firm in a shopping mall.

As the graduates, wearing black robes and garlands of pink and purple flowers, looked on, O'Connor, Rep. Claude Pepper (D-Fla.) and writer Elie Wiesel received honorary degrees from Georgetown's president, the Rev. Timothy S. Healy.

In addition, H. Carl Moultrie I, former chief judge of D.C. Superior Court, was awarded posthumously an honorary doctorate of laws.

Although many of yesterday's graduates already have received high-paying jobs with prestigious firms, at least some appear to have turned aside the high pay of the corporate legal establishment.

"I think it would be hard to leave the job I have," said Susan Athy, an aide to House Speaker Thomas P. O'Neill Jr. (D-Mass.), who is scheduled to retire at the end of the year. "I was fortunate to be able to work for him and I have no idea what I will do next."

Another graduate, brandishing but not wearing a headband that said "Loosen Up Sandy Baby," a reference to a remark Redskin John Riggins once made to O'Connor -- said he, too, wants to work in politics.

"Every time I read about the $70,000 salaries some people are paying I wonder what I could be doing," said the Capitol Hill aide, who asked not to be named. "But I think she is basically right. I wouldn't trade my life in to work at a law firm."