Local man pleads guilty in painkiller case