Man pleads guilty in sex case