I am a little puzzled as to what you are building. Are you applying wood trim to the suface of a clear glass door, or are you surrounding glass with wood trim? Clear silicone, as suggested by Cabinetman would probably be the best bet if you are applying the wood directly to the surface of the glass. If however, you are wanting to suround a piece of glass with wood trim, the the best idea would be to rabbet a groove in the trim so the glass fits into it.
Perhaps you can give us a better idea of what you are making, and we could be of more help.
Gerry