Rational points on certain hyperelliptic curves over finite fields