Yes, you can have fats with protein. This will not affect ketosis, and can be necessary in order to get adequate calories when restricting carbs. As far as "how much" to have before bed? This would depend upon your total caloric needs for the day, and you would know this much better than I.