If your phone's bootloader is locked then you definitely need to unlock it before performing those operations or non of them will succeed (the bootloader throws an error of some sort like "FAILED (remote: Command not allowed)"
I ran this command on a phone with locked bootloader
C:\AGUSTINO_ROOT\2014-08-02.21.07.25>fastboot flash recovery recovery.img
target reported max download size of 301989888 bytes
sending 'recovery' (6144 KB)...
OKAY [ 0.265s]
FAILED (remote: Command not allowed)
finished. total time: 0.281s
According to my experience, any partition recognized by the bootloader can be flashed using fastboot, to get list of known partition run
fastboot getvar all
This is my brief sample output:
C:\Users\kjhn>fastboot getvar all
(bootloader) partition-size:logo: 300000
(bootloader) partition-type:logo: raw data
(bootloader) partition-type:userdata: ext4
(bootloader) partition-type:cache: ext4
(bootloader) partition-size:system: 28a00000
(bootloader) partition-type:system: ext4
(bootloader) partition-type:ebr1: raw data
(bootloader) partition-type:mbr: raw data
(bootloader) partition-type:preloader: raw data
(bootloader) version: 0.5
finished. total time: 0.031s
Note the partitions names logo, mbr, ebr1 etc..
This method is as safe as the files you are trying to flash, make sure the ROM is compatible with your device before attempting this.
I also advise you not to temper with the preloader unless you are absolutely certain as it results into unrecoverable brick