Nope! The DPI/HDMI/TV outputs are all the same hardware driver so you can only have one at a time. To enable/disable the DPI display, comment out or uncomment
enable_dpi_lcd=1
display_default_lcd=1
in /boot/config.txt and reboot. It cannot be done on the 'fly'
If you'd like to check out the device tree overlay and how to customize, you can read some more here: http://blog.reasonablycorrect.com/raw-dpi-raspberry-pi/
Run:
sudo apt-get install device-tree-compiler
wget https://raw.githubusercontent.com/robertely/dpi666/master/setup/dt-blob-dpi.dts
sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-dpi.dts
to create your own!