Sure you can do it. To terminate the contract you must go to a Spanish lawyer to formally request payment of rents to the tenant and file a civil action for eviction for non-payment.
In such proceedings you will be able to obtain a sentence in which not only will a date be set for the tenant to leave the flat, but also a sentence for the months for which payment has not been made.
The filing of this civil action requires the mandatory presence of a lawyer.