Can I get a 'buy to let mortgage' in Spain?

There are no 'buy to let' specific mortgages in Spain. You can get a residential mortgage and then let the property out

Currently, there are no 'buy to let' mortgages available for non-residents. You can take out a residential mortgage, though and then let the property out. The usual eligibility criteria will apply for the mortgage and once granted and signed you can use the property how you wish.

If you wish to buy a property to rent out short term for holiday lets, usually a 'touristic' license is required.