In vivo and in vitro imaging using a multimodal optical system