Yes, you can!
If your beneficiary doesn’t live in the UK, they are likely to be a non-UK resident and a non-UK taxpayer.
This means that they may be liable for additional tax on the pension payment in the country in which they live, as well as UK tax.
This is less likely to be the case if the beneficiary lives in a country with which the UK has a double taxation agreement and the agreement exempts pensions from some, or all, UK tax.
HMRC provides more information on such agreements. You may want to take independent advice about doing this before nominating a beneficiary lives outside of the UK.