basic concept behind both is same,,but WDM is possible only in optical fibres and thus can only be used to multiplex optical signals. Howver FDM can be used to multiplex both.
By concept both are same, but the terminology depends on the range of frequency of the electromagnetic wave to be used for multiplexing. In the RF range it is termed as FDM whereas in the optical domain of frequency the other one.