You choose a target for Wasp of the Bitter End’s triggered ability right after casting a Bolas planeswalker spell, but you don’t choose whether to sacrifice Wasp of the Bitter End or not until that ability resolves. If the creature becomes an illegal target, the entire ability doesn’t resolve and you can’t sacrifice Wasp of the Bitter End.