Optical studies of materials at high pressure-temperature (P-T) conditions provide insights into their physical properties that may be inaccessible to direct determination at extreme conditions. Incandescent light sources, however, are insufficiently bright to optically probe samples with radiative temperatures above similar to 1000 K. Here we report on a system to perform optical absorption experiments in a laser-heated diamond anvil cell at T up to at least 4000 K. This setup is based on a pulsed supercontinuum (broadband) light probe and a gated CCD detector. Precise and tight synchronization of the detector gates (3 ns) to the bright probe pulses (1 ns) diminishes the recorded thermal background and preserves an excellent probe signal at high temperature. We demonstrate the efficiency of this spectroscopic setup by measuring the optical absorbance of solid and molten (Mg,Fe)SiO3, an important constituent of planetary mantles, at P similar to 30 GPa and T similar to 1200 K to 4150 K. Optical absorbance of the hot solid (Mg,Fe)SiO3 is moderately sensitive to temperature but increases abruptly upon melting and acquires a strong temperature dependence. Our results enable quantitative estimates of the opacity of planetary mantles with implications to their thermal and electrical conductivities, all of which have never been constrained at representative P-T conditions, and call for an optical detection of melting in silicate-bearing systems to resolve the extant ambiguity in their high-pressure melting curves.