The specific heat is approximately $C = 3Nk_B = 3 n R$ so you can find the number of moles in a sample: $n = \frac{C}{3R}$ If you know the mass of the sample (say, M) then the molar mass is just $\frac{M}{n} = \frac{3MR}{C}$