Yes you can install an SSD in the optical drive bay, but I recommend the SSD boot drive be installed in the main drive bay. If you have the 13" model, then you may need to replace the hard drive SATA Cable since it has an extremely high rate of failure on the 13" model especially when used with an SSD. OWC sells replacement hard drive SATA Cables.
Make sure to get a good SSD since many of them today are just low end budget economy models that can be as slow as a hard drive. I like the Crucial MX500 series as it is a good compromise on price & performance, but stay away from the Crucial BX500 series as it is a low end drive that overheats easily. Many contributors on these forums will recommend an OWC Mercury 6G SSD, but I'm not personally a fan of the OWC SSD, but it should be Ok for most people.
Macs are very picky about the memory they use so it is best to only use memory from Crucial or OWC. Make sure to use the tools on their respective websites to get the exact part numbers which are compatible with your Mac.
Are you planning on keeping your existing hard drive? If so you should check the health of the hard drive to be sure it is still in good health. To check the health of the hard drive run DriveDx and post the report here using the "Additional Text" icon which looks like a piece of paper. Personally I would replace the original hard drive with an SSD since the Apple hard drive are notoriously slow.