I need to make 40kHz square wave [for ultrasonic] signal and a 38kHz square wave (for IR transmission) signals.
I have two options
1. use NE556 dual timer
2. use CD4093 Schmitt trigger in relaxation oscillator mode
which approach is more suitable for stable and good signal generation?
At that frequencies, either one.
The stability is mainly determined by the capacitor you use, so get one with a low tempco.
If anything, the NE/LM/etc. 555 (i.e. the non-CMOS variety) is the worst choice, as the impedances of its inputs is lower than the 4093 (but with a CMOS-555 there's no difference worth mentioning).
I prefer CD4093 as it allows me to generate signals with low duty cycles where its hard to get low duty cycle signal from 556 timers.
Both can be used with as low a duty cycle as you like, a 555 just needs an extra resistor and a diode.
But if you like the 4093, go with it. Having more possibilities for gating isn't bad.
A low duty cycle may reduce the range, if it's used with integrated IR receivers however.
If you have a controller somewhere in the circuit, just let that generate the signals.
Unless you really need to maximize the range, you could just make a single 39kHz and use that for both the 38kHz and the 40kHz signal.
Here's a photo of an 38.4kHz remote I made recently:
The IR-LED was mounted closer in the final version, as it is a mod on a lighter with a white LED lamp and it had to be close to the rest to be able to fit - As it shows, I nibbed a corner of the microcontroller by accident, but it works fine and controls my cam at a distance of up to around 5m.
(I'm making a more powerful version soon, as I couldn't get room for a larger cap and the ridiculously small button cells just don't have the brass to increase the distance).