You'll have to ask on the DD-WRT forums since your device is currently running that firmware.
That said... in general, you can usually use TFTP to flash one of the partitions (likely the first one). It will usually not flash the other partition, though.
Try using TFTP to flash a copy of the factory firmware. Then, boot into that partition and then use the web UI to flash the other partition with that same firmware.
If it turns out that you flash it but still end up in DD-WRT, you can try to change the boot partition via the command line. I don't know if it will work the same way as it does on OpenWrt (on a different device), but you can see the nvram commands I used on an EA6300 in this thread. If that doesn't work, ask on the DD-WRT forums about the process of changing the boot partition.... ultimately you want to get back to the linksys firmware on both partitions.