From: Rabbi Moshe Sofer
To: Rabbi Mordechai Tusk
A man called to the Torah as Yehoshua (יהושע) but who signs documents as Yehoshia (יהושיע) with an extra yud required a ruling on which form to use in his get. The Chasam Sofer rules that lechatchila the get should use Yehoshua without a yud, following his Torah-reading name, since the variant spelling Yehoshia does not appear in Scripture or Talmud and is merely a corruption or nickname, with no concern of la'az.
Source: Shu"t Chasam Sofer EH II §117