We consider the optimal control of an M/G/1 queue with finite input source. The queue length, however, can be only imperfectly observed through the observations at the initial time and the times of successive departures. At these times, the service rate can be chosen, based on the observable histories. A service cost and a holding cost are incurred. We show that such a control problem can be formulated as a semi-Markov decision process with imperfect state information, and present sufficient conditions for the existence of an optimal stationary I-policy.