A parolee who pleaded that he couldn't remember shooting at police during the robbery of a Silver Spring jewelry store because he was on drugs was sentenced to 45 years in prison yesterday.

Ray Williams, 36, who was arrested as he attempted to flee from the holdup last Sept. 15 at Salter Jewelers, 8650 Colesville Rd., was sentenced to 20 years for armed robbery, 15 years for assault with intent to murder (shooting at police) and 10 years for using a handgun in a felony.

In ordering the terms to be served consecutively, Circuit Judge Irma S. Raker warned that "the community won't excuse responsibility for actions" committed because of the influence of narcotics.

Despite 10 previous convictions, Williams, of 624 Keefer Pl. NW, argued that he was "not a career criminal," as the judge described him, and said he hadn't "killed the president or anything like that." He had been paroled from a federal prison in Lewisburg, Pa., in April 1981 after serving six years for the armed robbery of a D. C. bank.

Five months later, according to police, Williams, armed with a handgun, and his nephew, Johnny B. Williams, entered the jewelry store and forced customers and employes to lie on the floor while Johnny Williams scooped about $20,000 worth of jewelry from display cases. Ray Williams fired two shots in the direction of the people lying on the floor, according to testimony.

The holdup was spotted by County Police Officer Tom Sittner, who was stationed on the third floor of a building across the street with a pair of binoculars as part of an effort to prevent crime in the busy commercial area.

Sittner called for reinforcements, and as the robbers left the store, Ray Williams fired twice at Officer Bruce Wertz, before being arrested.

Williams was convicted by a jury in March. His nephew, of 703 Chillum Rd., Hyattsville, pleaded guilty to armed robbery and is awaiting sentencing.