Constraining alternative theories of gravity using GW150914 and GW151226