It is possible but before attempting to do so you should copy your critical files to another drive (either internal or external).
One possible way to do this is to:
"1. Back up to an external device any important data on D and, optionally, move the same important data from D to C.
2. Right-click Computer > Manage > Storage > Disk Management, then right-click the graphic of the D partition and select Delete. The partition returns to Unallocated for a Primary Partition or Free Space if it‘s a Logical Drive within an Extended Partition. Delete the partition if it is an Extended partition.
3. Now right-click the graphic of the C partition and select Extend."
Source: http://social.technet.microsoft.com/Forums/windows/en-US/19b60bc3-86a2-45d1-b2b5-16f9f3671a2b/how-to-merge-partitions-in-windows-7-
After you have merged the two partitions and before installing the OS make sure you remove the HDD. Install the SSD, install the OS and then add the HDD back into the case.