A man armed with a pistol assassinated the assistant military attache of the U.S. Embassy here today, firing a single bullet into the back of his head on the sidewalk of a tree-lined boulevard in Paris' most fashionable neighborhood.

The murder of Lt. Col. Charles Ray, 43, came just five weeks after a strikingly similar, but unsuccessful, assassination attempt against the embassy's second-ranking diplomat, Christian Chapman. Along with the abduction of Brig. Gen. James Dozier in Italy, it focused attention once more on the safety of U.S. military and diplomatic personnel abroad.

Ray was shot at about 9 a.m. as he walked in civilian clothes from his apartment on the Boulevard Emile Augier in the 16th arrondissement near the Bois de Boulogne. His killer came up behind him as he walked unaccompanied to his car, shooting him once with a 7.65 mm pistol from approximately five feet away, Paris police said.

The assassin fled on foot unhindered and unidentified. Police said a witness described him as "a short man with long, dark hair, dressed in a run-down way." There were no indications who he might be, police said, except that the lone shell casing found on the ground was the same brand as six shells found after the Nov. 12 assassination attempt against Chapman.

Ambassador Evan Galbraith, after a previously scheduled lunch later in the day with President Francois Mitterrand, said security for embassy personnel will be reexamined and reinforced. He did not give details on how French police and U.S. security officials can guarantee the safety of the about 450 Americans stationed at the Paris embassy and at U.S. missions here to the U.N. Educational, Scientific and Cultural Organization and the Organization for Economic Cooperation and Development.

"I am revolted by news of the cold-blooded murder of Lt. Col. Ray," Galbraith said. "Think about what those cowards have done to his family. Col. Ray was a soldier who served his country in peace as well as war. We continue as he would have continued. His friends and colleagues will remember his sense of duty. We weep for those he left behind."

In Washington, President Reagan decried the assassination as an act of international terrorism, saying Ray "gave his life in the line of duty as surely as if he had fallen in battle."

The president also commented on the killing while talking with reporters after a meeting with U.S. Ambassador to Japan Mike Mansfield. Reagan said, "probably the only defense" against terrorists is "infiltration--to find out in advance what their plans are."

The president added: "In the last few years that's been made more difficult. We're doing our best to try to correct something like that."

Ray, who was assigned to the Paris embassy in August 1980, leaves a widow and two teen-age children. He held the Bronze Star with two oak-leaf clusters.

Ray had been stationed in Paris with his family since August 1980. He was schooled in military intelligence and served in Vietnam, U.S. Army records show.

After his service in Vietnam he taught at the Army intelligence school at Fort Holabird, Md., before being assigned to the Pentagon from 1969 to 1975 under the Army's assistant chief of staff for intelligence.

"I wish to share with you my emotion after the cowardly assassination that has just cost the life of Lt. Col. Charles Ray, deputy military attache at your embassy," Mitterrand said in an official telegram to Galbraith. "I am asking the government to use all necessary means to shed light on the circumstances of this crime. I ask you, Mr. Ambassador, to give my sad condolences to Lt. Col. Ray's family."

News agency reports from Beirut said an unknown group calling itself the Lebanese Armed Revolutionary Faction claimed responsibility for the assassination in a telephone call to Western correspondents. A similar call was made to foreign news agencies in Beirut after the attempt on Chapman's life, but the reports said neither call was taken seriously.

Secretary of State Alexander M. Haig Jr. said immediately after the attempt to kill Chapman that Washington had indications Libyan assassination squads were behind it. Paris police have not reported finding any clues in that attack.

Haig was believed to have been referring to intelligence reports that Libyans were assigned this fall to kill U.S. diplomats in Europe. These reports were passed on to the French Foreign Ministry, which offered to increase protection of top embassy officers. Since then officials in the Reagan administration have reported indications that Libya might also be trying to assassinate President Reagan and his top lieutenants.

Although security precautions at the embassy are secret, French police are believed to assign cars to tail Galbraith and other high-ranking officers. Chapman did not have such a "follow-on car" when he was shot at leaving his apartment, but since then is believed to have taken up a French offer for such protection.

Galbraith and Chapman arrived for today's lunch with Mitterrand in an armored limousine. The ambassador later appeared in public, however, at a wreath-laying ceremony at the Arch of Triumph