Short answer. Yes. Rule 102, Section 3 allows the petition to describe the detaining officer by an assumed appellation when his name or identity is unknown or uncertain, and whoever is actually served with the writ is then deemed the person the petition intended — so not knowing the jailer's name does not stop you from filing.
What the law says
The officer or name of the person by whom he is so imprisoned or restrained; or, if both are unknown or uncertain, such officer or person may be described by an assumed appellation, and the person who is served with the writ shall be deemed the person intended
Rule 102, Section 3 — Requisites of application therefor. Read the full provision →
The assumed-appellation option
Rule 102, Section 3(b) requires the petition to state the officer or name of the person holding your relative, but it builds in an exception for exactly this situation: if both are unknown or uncertain, such officer or person may be described by an assumed appellation. You are not required to know the jailer's real name before you can file — a placeholder description, such as the officer-in-charge of a named facility, satisfies the requirement in his place.
Who the writ actually reaches
The rule also settles who ends up bound by the petition once it is filed under an assumed name: the person who is served with the writ shall be deemed the person intended. So the petition does not fail for lack of a correct name — whoever actually receives and is served the writ at the place of detention becomes the respondent the case proceeds against, regardless of what name, real or assumed, appears on the petition itself.
What else the petition must still contain
Section 3 also requires the petition to set out that the person on whose behalf it is made is imprisoned or restrained of liberty, the place of imprisonment or restraint if known, and a copy of the commitment or the cause of detention if it can be obtained without impairing the remedy's effectiveness — or, if the restraint is without any legal authority at all, that fact itself must appear. The unknown officer's name is only one of several elements the petition must address.
Why the place matters if the name doesn't
Because the rule allows an unknown officer to be described by an assumed appellation, the practical anchor for the petition becomes the place of imprisonment or restraint, which the rule separately requires you to state if it is known. Identifying where your relative is being held, even without the jailer's name, gives the court and the eventual respondent enough to act on when the writ is served.