This paper considers beamforming for a reconfigurable intelligent surface (RIS)-aided multiple input single output (MISO) communication system in the presence of Rician multipath fading. Our aim is to jointly optimize the transmit beamformer and RIS phase shift matrix for maximizing the mean signal-to-noise (SNR) of the combined signal received over direct and indirect links. While numerical solutions are known for such optimization problems, this is the first paper to derive closed-form expressions for the optimal beamformer and the phase shifter for a closely related problem. In particular, we maximize a carefully constructed lower bound of the mean SNR, which is more conducive to analytical treatment. Further, we show that effective channel gain under optimal beamforming follows Rice distribution. Next, we use these results to characterize a closed-form expression for the outage probability under the proposed beamforming scheme, which is subsequently employed to derive an analytical expression for the ergodic capacity. Finally, we numerically demonstrate the efficacy of the proposed beamformer solution in comparison with the existing algorithmically obtained optimal solution for the exact mean SNR maximization.