.
Check out the following 400D/XTi manual sections (page numbers may be different):
Using the built-in flash (page 54)
Flash Exposure Compensation (page 75)
FE Lock (page 85)
One possibility would be to set the camera to Tv mode with the Mode Dial and dial in an exposure of 1/200th second or slower (required for flash sync) and put first pressure on the shutter to see what the optimum Av value for the sunset is. You might have to lower the shutter speed and/or increase the ISO to get an acceptable aperture. Go to M mode and set these aperture and exposure settings and then follow the procedure for "FE Lock" to get the required flash output for the plants (I'm assuming here that the on-board flash is powerful enough).
Health Warning: I've never tried this so if it doesn't work then please let me know.
Bob.