You can. It doesn't need to know the move in order for you to change its type. Just use the gems on it and it'll be the intended type when it transforms.