Make use of the 'day()' an 'sumproduct' functions.
=sumproduct((A1:A10=day(1))*(B1:B10))