The white substance is a high-quality lubricant used by factories to facilitate installation of memory DIMMs. The grease will not damage the memory or any MacBook components.
Over time the lubricant may evaporate and become less visible. Future RAM installations will not require additional lubricant.
Note: While the grease presents no potential harm if it contacts your skin, it should be washed off using soap and warm water.
I kid you not.