The reason it's considered not safe to eat goat cheese while pregnant or any other cheese while pregnant is because of bacteria that the goat cheese or any other cheese can contain.
However when you add goat cheese to the Pizza the Goat Cheese will be cooked which makes the goat cheese safe to eat while pregnant.
So having goat cheese on pizza when you're pregnant is safe since the goat cheese is cooked and cooking the goat cheese will kill the bacteria that it would contain.