Yes. It's common practice.
Many people name their solicitor as an executor and then get that solicitor, plus one other person, such as the solicitor's clerk, to act as witnesses to their signature.
If you're writing your will, the important things to remember (with regard to witnesses) are:
(i) no beneficiary of the will should act as witness. (If they do so, the substantive parts of the will remain valid but the witness will lose their inheritance) ; and
(ii) there should be an 'attestation clause', such as 'Signed by Fred Smith in our presence and then by us in his' or (if you prefer the traditional legal terminology) 'Signed by the said Fred Smith as and for his last will and testament in the presence of us both present at the same time who have then at his request in his presence and in the presence of each other hereunto subscribed our names as witnesses'. (If there is no attestation clause it might be necessary, in order to prove the will, to contact the witnesses to seek affidavits from them regarding the circumstances under which they gave their signatures).
Chris
(Former MD of a will-writing company)