Find the examples that come with the SD library you are using - they should show how to write to a file. You need to pass the NMEA sentence in question (that's what those GPS strings are called!) to the relevent write function.
You'll have to work out when to open / flush / close the file on the SDcard depending on your requirements.