We demonstrate the potential of spatial light modulators for the spectral control of a broadband source in digital holographic microscopy. Used in a 'pulse-shaping' geometry, the spatial light modulator provides a versatile control over the bandwidth and wavelength of the light source. The control of these properties enables adaptation to various experimental conditions. As a first application, we show that the source bandwidth can be adapted to the off-axis geometry to provide quantitative phase imaging over the whole field of view. As a second application, we generate sequences of appropriate wavelengths for a hierarchical optical phase unwrapping algorithm, which enables the measurement of the topography of high-aspect ratio structures without phase ambiguity. Examples are given with step heights up to 50 µm.