Yes. You can repay your loan at any time, and interest is only charged for the period the loan is outstanding.