Knapsack-like problem with profit formula
One simple algorithm is as follows. Start by choosing the dumbbell which is going to have the minimum weight (we are going to try all possibilities). Then take the $M$ dumbbells with maximal rep among those with weight above the minimum weight (if there are enough). 

To implement this algorithm efficiently, start by sorting the dumbbells according to weight and according to rep (separately), and find the $M$ dumbbells with maximal rep. Now go over the dumbbells in order of weight, each time removing the dumbbell with lowest weight and updating the set of $M$ best dumbbells. If you're careful you might be able to implement this in $O(N)$, so together with the initial sorting, the algorithm might run in time $O(N\log N)$.