I left out a last sentence. Thank you very much, Writeacher.

He told me that I could go to the cinema provided that I finished (not I had finished) my homework.

Yes, it's fine, as long as you leave out the words in parentheses!