Measurable selection theorems for optimization problems