Judge fines police officer for attempted misconduct in office