Depends what you need it to do. You should be able to access a disc in another Mac's optical drive simply by connecting to it using +File Sharing+. You would enable +File Sharing+ on the MacBook in System Preference
Sharing pane and insert the disc into the optical drive. Then, on the iMac G4, select from Finder's menu, +Go -> Connect to Server+. This will allow access to data on the disc, but it would not work for booting from the disc.
If you want more direct access to it, so that the optical drive acts like the iMac G4's optical drive, you may be able to use FireWire Target Disk Mode. Start up the MacBook in FireWire Target Disk Mode (if your MacBook is a model that has a FireWire port).
http://support.apple.com/kb/HT1661
Insert the optical disc and start up the MacBook in this mode. Connect the two Macs using a FireWire cable, and the optical drive may be usable from the iMac G4, as an external optical drive. This method does not work (with the optical drive) on all target mode Macs.