During Joseph Smith's lifetime, Alma was known as a feminine name only, however it's used as a masculine name in the Book of Mormon. After Joseph Smith's death, one of the Bar Kokhba documents discovered in the Judean desert used the name Alma as a masculine name. Joseph Smith couldn't possibly have known that decades after his death a document would be discovered proving that Alma was used as a masculine name in ancient Judea. Does the fact that the Book of Mormon uses Alma as a masculine name prove that it's true?
The masculine name Alma first appears in the Book of Mormon chronology about 170 BC, but doesn't appear in Judea until about 150 AD. According to the Book of Mormon, the ancestors of the Native Americans left Jerusalem around 600 BC and had no contact with the outside world until Columbus. Is it possible that the name Alma goes back to 600 BC even though there's no evidence that it was used as a masculine name until seven hundred years later?
It's possible. However it's also possible that Joseph Smith mistakenly thought that Alma was a masculine name even though it was known to be only a feminine name during his lifetime.
Another thing to consider is that the Book of Mormon is written in English while the Bar Kokhba letters are written in Hebrew. The two languages use completely different alphabets, so an exact translation is impossible. "Alma" may indeed be the best English language translation for the Hebrew name that appears in the Bar Kokhba letter, but it's not the only way it can be translated.
We also need to consider the possibility that Joseph Smith simply got lucky. There are 337 proper names in the Book of Mormon. 149 of these are found in the Bible, leaving 188 names unique to the Book of Mormon. Of these 188 names, only one of them, Alma, has turned out to be an ancient Hebrew name. The remaining 187 names, although some sound vaguely Hebrew, are not known to be ancient Hebrew names. Unless we uncover some more ancient documents verifying other names used in the Book of Mormon, the most likely scenario is that Joseph Smith simply made up a bunch of Biblical sounding names and happened to get one right.