You can train to go on command, but I'm suggesting to use just click and treat every time your dog is going to the bathroom. Just train them to pee/poo like you were going to training them to sit, down etc. The timing of the click and treat is crucial. When my puppy squatted and pee/poo I clicked and was giving her a treat when she was still in the act of pee/pooing. Also make sure it is a high value treat, something you know they love and only give it to them for pee/pooing. You know you are getting through to them if in the process of pee/pooing they are looking at you for a treat. That's when they understand that they are doing something correctly to get a reward.
Another thing is during this process you must watch them like a hawk. Combined with a crate you'll be able to time when they need to go so that you can make your click/treat highly effective. Clicking is great if you want to pad train them. It will tell them the pad is the only place they will get that treat. So when you know when they need to go bring them to the pad and click/treat when they are doing it.
Just trying to help. Let me know if you need any more tips.