Yesterday, AS I LAY DYING singer Tim Lambesis pleaded not guilty to a felony charge of solicitation of murder.  He's been accusedof trying to hire a hit man to kill his estranged wife.  He's being held on $3 MILLION bail.

If he's convicted, he's looking at NINE YEARS in prison.

The D.A. said that Tim met with an undercover cop who was posing as a hit man, and Tim told him he wanted his wife "gone."

He gave the guy an envelope with $1,000 in cash . . . pictures of his wife . . . her address . . . the access code to her place . . . and a list of dates that the man could do it.  Those were days when HE had the kids, so they could serve as his alibi.

Tim's wife Meggan filed for divorce last September, citing "irreconcilable differences."  In the divorce papers, she said Tim had become obsessed with bodybuilding, blew a ton of money on tattoos and was "distracted" around his kids.

They have three kids that they adopted from Ethiopia.