At any time, yes you can change your talents and fulfill another role. HOWEVER, up until level 60 or so, you don't really have to worry about being that spec when fulfilling that role. For example, you could have put all your points in retribution, but you will still be able to tank or heal an instance, just not as well as those specs would have. After 60, it becomes more necessary to be that spec to fulfill that role.