40 gallon is on the small side for a diamond goby, this is mostly due to them needing a very large deep sand bed, that has matured extensively, for them to have enough supplemental food in their diet to be healthy, you can get one to take prepared foods, but they get most of their nutrition from sifting, all day long.
Anyways, back to your original question, they'll be fine with each other, they are fairly different despite both being gobies. The diamond will be out and about all day sifting sand the Yellow Watchman will tend to stick in a particular area, usually around its burrow, especially if paired with a pistol shrimp.