Yes, you can apply for marriage-based adjustment of status while you are on H-1B or L-1 status. An H-1B nonimmigrant visa and an L-1 nonimmigrant visa status is a dual intent type of visa. Being under a dual intent nonimmigrant visa status that you can concurrently seek lawful permanent resident status. That means that you can file for adjustment of status while remaining in lawful H-1B visa status or L-1 nonimmigrant status.
If you are marrying a lawful permanent resident, you will need to maintain your lawful H-1B visa status or L-1 visa status throughout the entire marriage-based adjustment of status process. Contact us if you have any further questions about this.