If you're going for minimum component count, you could set up one of the microcontroller timer outputs in variable frequency, 50% duty cycle mode. (Check the datasheet, it's often listed as "toggle" mode.) Not sure if you need to provide a differential signal or if just driving one side while having the other side on a fixed bias would do. On the receive side, use a comparator (either built into the microcontroller or a separate one) to turn the differential signal to single ended and then use a microcontroller timer to measure the frequency.
I have some old 4Gb SFPs lying around that I would like to play with, I assume they're not even worth as much as the matching sockets so my best bet would be to just solder wires to the pins. (Is it correct that on the off chance I get something that expects a 4Gb SFP, I can just put in a 10Gb SFP and expect it to work?)