I just answered my own question, here's what you do:
* gdb a.out
* break main
* run
(at breakpoint)
* set env LD_PRELOAD=./SHARED_LIBRARY_NAME
* break FUNCTION_NAME
(the following prompt should appear
Function "FUNCTION_NAME" not defined.
Make breakpoint pending on future shared library load? (y or [n])
(answer yes)
y
* cont
(program should continue and stop at the breakpoint)