We analyze the optimality of beamforming in multiple-input single-output relay channels without a direct link between the source and the destination. Assuming that the source has access to the channel correlation information, and that the relay operates in amplify and forward mode with a long term power constraint, we first show that the optimal transmission strategy is to transmit along the eigen-vectors of the transmit correlation matrix. The optimality of beamforming is then studied via the power allocation problem at the source. In particular, we derive a necessary and sufficient condition under which beamforming achieves the capacity. Our results demonstrate that the finite relay gain decreases the range at which beamforming is optimal.